-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Description
Describe the bug
From 0.35.0, Triton seems to be required to run Diffusers, however no matter what version or whl I dig up, I end up with the above-mentioned error. Downgrading to 0.34.0, it works as it used to.
The error has stalled the development of my Diffusers based free add-on for Blender: Pallaidium. And users report the same error.
(Since it is using Blender's Python, the possible whls must be build for Python 3.11)
I've tried the windows-triton builds and any supposedly compatible triton whl on HF, I even tried to build my own whl. And none of it worked.
What do we do?
Reproduction
Running Diffusers 0.35.0 with any Windows Triton whl out there (...maybe?).
Logs
RuntimeError: Failed to import diffusers.models.transformers.transformer_flux because of the following error (look up to see its traceback):
DLL load failed while importing libtriton: A dynamic link library (DLL) initialization routine failed.
Error: Python: Traceback (most recent call last):
File "...\python\Lib\site-packages\diffusers\utils\import_utils.py", line 953, in _get_module
return importlib.import_module("." + module_name, self.__name__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\python\Lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "...\python\Lib\site-packages\diffusers\models\transformers\__init__.py", line 20, in <module>
from .transformer_chroma import ChromaTransformer2DModel
File "...\python\Lib\site-packages\diffusers\models\transformers\transformer_chroma.py", line 33, in <module>
from .transformer_flux import FluxAttention, FluxAttnProcessor
File "...\python\Lib\site-packages\diffusers\models\transformers\transformer_flux.py", line 29, in <module>
from ..attention_dispatch import dispatch_attention_fn
File "...\python\Lib\site-packages\diffusers\models\attention_dispatch.py", line 72, in <module>
from sageattention import (
File "...\python\Lib\site-packages\sageattention\__init__.py", line 1, in <module>
from .core import sageattn, sageattn_varlen
File "...\python\Lib\site-packages\sageattention\core.py", line 20, in <module>
from .triton.quant_per_block import per_block_int8 as per_block_int8_triton
File "...\python\Lib\site-packages\sageattention\triton\quant_per_block.py", line 18, in <module>
import triton
File "...\python\Lib\site-packages\triton\__init__.py", line 20, in <module>
from .runtime import (
File "...\python\Lib\site-packages\triton\runtime\__init__.py", line 1, in <module>
from .autotuner import (Autotuner, Config, Heuristics, autotune, heuristics)
File "...\python\Lib\site-packages\triton\runtime\autotuner.py", line 9, in <module>
from ..testing import do_bench, do_bench_cudagraph
File "...\python\Lib\site-packages\triton\testing.py", line 7, in <module>
from . import language as tl
File "...\python\Lib\site-packages\triton\language\__init__.py", line 4, in <module>
from . import math
File "...\python\Lib\site-packages\triton\language\math.py", line 1, in <module>
from . import core
File "...\python\Lib\site-packages\triton\language\core.py", line 10, in <module>
from ..runtime.jit import jit
File "...\python\Lib\site-packages\triton\runtime\jit.py", line 12, in <module>
from ..runtime.driver import driver
File "...\python\Lib\site-packages\triton\runtime\driver.py", line 1, in <module>
from ..backends import backends
File "...\python\Lib\site-packages\triton\backends\__init__.py", line 50, in <module>
backends = _discover_backends()
^^^^^^^^^^^^^^^^^^^^
File "...\python\Lib\site-packages\triton\backends\__init__.py", line 43, in _discover_backends
compiler = _load_module(name, os.path.join(root, name, 'compiler.py'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\python\Lib\site-packages\triton\backends\__init__.py", line 12, in _load_module
spec.loader.exec_module(module)
File "...\python\Lib\site-packages\triton\backends\amd\compiler.py", line 2, in <module>
from triton._C.libtriton import ir, passes, llvm, amd
ImportError: DLL load failed while importing libtriton: A dynamic link library (DLL) initialization routine failed.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "...\python\Lib\site-packages\diffusers\utils\import_utils.py", line 955, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.models.transformers.transformer_flux because of the following error (look up to see its traceback):
DLL load failed while importing libtriton: A dynamic link library (DLL) initialization routine failed.
System Info
accelerate: 1.11.0.dev0
aiofiles: 24.1.0
aiohappyeyeballs: 2.6.1
aiohttp: 3.12.15
aiosignal: 1.4.0
alias-free-torch: 0.0.6
annotated-types: 0.7.0
antlr4-python3-runtime: 4.9.3
anyio: 4.9.0
appdirs: 1.4.4
argbind: 0.3.9
asdff: 0.1.0
asttokens: 3.0.0
attrs: 25.3.0
audioread: 3.0.1
aura-sr: 0.0.4
auraloss: 0.4.0
autopep8: 2.3.1
av: 14.4.0
beautifulsoup4: 4.13.5
bitsandbytes: 0.47.0
blis: 1.2.1
boto3: 1.38.25
botocore: 1.38.25
braceexpand: 0.1.7
Brotli: 1.1.0
cached_path: 1.7.3
cachetools: 5.5.2
catalogue: 2.0.10
celluloid: 0.2.0
certifi: 2021.10.8
cffi: 1.17.1
cfgv: 3.4.0
chardet: 5.2.0
charset-normalizer: 2.0.10
chatterbox-tts: 0.1.1
clean-fid: 0.1.35
click: 8.2.1
clip-anytorch: 2.6.0
cloudpathlib: 0.21.1
cloudpickle: 3.1.1
cmudict: 1.0.32
colorama: 0.4.6
colorlog: 6.9.0
confection: 0.1.5
configparser: 7.2.0
conformer: 0.3.2
contourpy: 1.3.2
controlnet_aux: 0.0.10
cupy-cuda12x: 12.3.0
cycler: 0.12.1
cymem: 2.0.11
Cython: 3.0.11
da_core_news_md: 3.8.0
datasets: 4.0.0
dctorch: 0.1.2
decorator: 5.2.1
deepspeed: 0.16.5
descript-audio-codec: 1.0.0
descript-audio-codec-unofficial: 1.0.0
descript-audiotools: 0.7.2
descript-audiotools-unofficial: 0.7.4
diffusers: 0.35.0
dill: 0.3.8
distlib: 0.3.9
docker-pycreds: 0.4.0
docstring_parser: 0.16
einops: 0.8.1
einops-exts: 0.0.4
einx: 0.3.0
ema-pytorch: 0.7.7
en_core_web_md: 3.8.0
encodec: 0.1.1
executing: 2.2.0
f5-tts: 1.1.8
fastapi: 0.115.12
fastcore: 1.8.7
fastprogress: 1.0.3
fastrlock: 0.8.3
ffmpy: 0.5.0
filelock: 3.18.0
fire: 0.7.0
flatbuffers: 25.2.10
flatten-dict: 0.4.2
fonttools: 4.58.1
frozendict: 2.4.6
frozenlist: 1.7.0
fsspec: 2025.3.0
ftfy: 6.3.1
funcy: 2.0
future: 1.0.0
gguf: 0.17.1
gin-config: 0.5.0
gitdb: 4.0.12
GitPython: 3.1.44
google-api-core: 2.25.0rc1
google-auth: 2.40.2
google-cloud-core: 2.4.3
google-cloud-storage: 2.19.0
google-crc32c: 1.7.1
google-resumable-media: 2.7.2
googleapis-common-protos: 1.70.0
gradio: 5.39.0
gradio_client: 1.11.0
groovy: 0.1.2
grpcio: 1.71.0
h11: 0.16.0
h5py: 3.13.0
hf-xet: 1.1.5
hjson: 3.1.0
httpcore: 1.0.9
httpx: 0.28.1
huggingface-hub: 0.34.4
hydra-colorlog: 1.2.0
hydra-core: 1.3.2
HyperPyYAML: 1.2.2
identify: 2.6.12
idna: 3.3
image_gen_aux: 0.1.0.dev0
imageio: 2.37.0
imageio-ffmpeg: 0.6.0
imhist: 0.0.4
importlib_metadata: 8.7.0
importlib-resources: 5.12.0
imWatermark: 0.0.2
ipython: 9.5.0
ipython_pygments_lexers: 1.1.1
jax: 0.7.1
jaxlib: 0.7.1
jedi: 0.19.2
jieba: 0.42.1
Jinja2: 3.1.6
jmespath: 1.0.1
joblib: 1.5.1
jsonmerge: 1.9.2
jsonschema: 4.24.0
jsonschema-specifications: 2025.4.1
julius: 0.2.7
k-diffusion: 0.1.1
kiwisolver: 1.4.8
kornia: 0.8.1
kornia_rs: 0.1.9
laion_clap: 1.1.6
langcodes: 3.5.0
language_data: 1.3.0
lazy_loader: 0.4
librosa: 0.11.0
lightning-utilities: 0.14.3
llvmlite: 0.44.0
lmdb: 1.7.3
local-attention: 1.8.6
loguru: 0.7.3
marisa-trie: 1.2.1
Markdown: 3.8
markdown-it-py: 3.0.0
markdown2: 2.5.3
MarkupSafe: 3.0.2
matplotlib: 3.10.3
matplotlib-inline: 0.1.7
mdurl: 0.1.2
mediapipe: 0.10.21
meson: 0.63.0
ml_dtypes: 0.5.1
mmaudio: 1.0.0
mpmath: 1.3.0
msgpack: 1.1.0
multidict: 6.6.4
multiprocess: 0.70.16
murmurhash: 1.0.13
networkx: 3.4.2
ninja: 1.11.1.4
nitrous_ema: 0.0.1
nodeenv: 1.9.1
numba: 0.61.2
numpy: 1.26.4
omegaconf: 2.3.0
onnx: 1.18.0
open_clip_torch: 2.32.0
opencv-contrib-python: 4.11.0.86
opencv-python: 4.12.0.88
opencv-python-headless: 4.11.0.86
opt_einsum: 3.4.0
orjson: 3.10.18
packaging: 25.0
pandas: 2.0.2
parler_tts: 0.2.2
parso: 0.8.4
pathtools: 0.1.2
peft: 0.17.1
pillow: 11.3.0
pip: 25.2
platformdirs: 4.3.8
polars: 1.33.0
pooch: 1.8.2
pre_commit: 4.2.0
prefigure: 0.0.9
preshed: 3.0.10
progressbar: 2.5
prompt_toolkit: 3.0.51
propcache: 0.3.2
proto-plus: 1.26.1
protobuf: 3.20.1
psutil: 7.0.0
ptflops: 0.7.4
pure_eval: 0.2.3
py-cpuinfo: 9.0.0
pyarrow: 21.0.0
pyasn1: 0.6.1
pyasn1_modules: 0.4.2
pycodestyle: 2.12.1
pycparser: 2.22
pydantic: 2.10.6
pydantic_core: 2.27.2
pydub: 0.25.1
Pygments: 2.19.1
pyloudnorm: 0.1.1
pyparsing: 3.2.3
pyphen: 0.17.2
pypinyin: 0.54.0
pystoi: 0.4.1
python-dateutil: 2.9.0.post0
python-dotenv: 1.1.0
python-multipart: 0.0.20
pytorch-lightning: 2.1.0
pytz: 2025.2
PyWavelets: 1.4.1
PyYAML: 6.0.2
randomname: 0.2.1
referencing: 0.36.2
regex: 2024.11.6
reportlab: 4.4.1
requests: 2.32.5
resampy: 0.4.3
resemble-enhance: 0.0.2.dev241130080118
resemble-perth: 1.0.1
rich: 13.9.4
rpds-py: 0.25.1
rsa: 4.9.1
ruamel.yaml: 0.18.14
ruamel.yaml.clib: 0.2.12
ruff: 0.11.11
s3tokenizer: 0.2.0
s3transfer: 0.13.0
safehttpx: 0.1.6
safetensors: 0.6.2
sageattention: 2.1.1+cu124torch2.5.1
scikit-image: 0.25.2
scikit-learn: 1.2.2
scipy: 1.16.1
screenplain: 0.11.1
semantic-version: 2.10.0
sentencepiece: 0.1.99
sentry-sdk: 2.29.1
setproctitle: 1.3.6
setuptools: 63.2.0
shellingham: 1.5.4
six: 1.17.0
smart-open: 7.1.0
smmap: 5.0.2
sniffio: 1.3.1
sounddevice: 0.5.2
soundfile: 0.13.1
soupsieve: 2.7
soxr: 0.5.0.post1
spacy: 3.8.7
spacy-legacy: 3.0.12
spacy-loggers: 1.0.5
spandrel: 0.4.1
speechbrain: 0.5.16
srsly: 2.5.1
stable-audio-tools: 0.0.19
stack-data: 0.6.3
starlette: 0.46.2
suno-bark: 0.0.1a0
sympy: 1.13.1
tabulate: 0.9.0
tensorboard: 2.19.0
tensorboard-data-server: 0.7.2
tensordict: 0.8.3
termcolor: 3.1.0
textstat: 0.7.7
thinc: 8.3.4
threadpoolctl: 3.6.0
tifffile: 2025.5.26
timm: 1.0.20.dev0
tokenizers: 0.22.0
tomli: 2.2.1
tomlkit: 0.13.2
torch: 2.6.0+cu124
torch-stoi: 0.2.3
torchao: 0.12.0
torchaudio: 2.6.0+cu124
torchdiffeq: 0.2.5
torcheval: 0.0.7
torchlibrosa: 0.1.0
torchmetrics: 0.11.4
torchsde: 0.2.6
torchvision: 0.21.0+cu124
tqdm: 4.67.1
traitlets: 5.14.3
trampoline: 0.1.2
transformers: 4.57.0.dev0
transformers-stream-generator: 0.0.5
triton: 3.1.0
typer: 0.16.0
typing_extensions: 4.13.2
typing-inspection: 0.4.1
tzdata: 2025.2
ultralytics: 8.3.191
ultralytics-thop: 2.0.14
Unidecode: 1.4.0
urllib3: 1.26.8
uvicorn: 0.34.2
v-diffusion-pytorch: 0.0.2
vector-quantize-pytorch: 1.14.41
virtualenv: 20.31.2
vocos: 0.1.0
wandb: 0.15.4
wasabi: 1.1.3
wcwidth: 0.2.13
weasel: 0.4.1
webdataset: 0.2.100
websockets: 15.0.1
Werkzeug: 3.1.3
wget: 3.2
WhisperSpeech: 0.8
win32_setctime: 1.2.0
wrapt: 1.17.3
x-transformers: 2.3.9
xformers: 0.0.29.post3
xxhash: 3.5.0
yarl: 1.20.1
zipp: 3.22.0
zstandard: 0.16.0