error possibly from PyTorch or Xformers
rodsott opened this issue · 1 comments
I`m on windows 10, running it inside a Git Bash console. It give the following error when I run the training:
Traceback (most recent call last): File "X:\ai\AnimateDiff-MotionDirector\train.py", line 20, in <module> import diffusers File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\diffusers\__init__.py", line 28, in <module> from .models import ( File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\diffusers\models\__init__.py", line 19, in <module> from .attention import Transformer2DModel File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\diffusers\models\attention.py", line 43, in <module> import xformers.ops File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\__init__.py", line 8, in <module> from .fmha import ( File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\fmha\__init__.py", line 10, in <module> from . import attn_bias, cutlass, decoder, flash, small_k, triton, triton_splitk File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\fmha\triton_splitk.py", line 21, in <module> if TYPE_CHECKING or _has_triton21(): File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\common.py", line 181, in _has_triton21 if not _is_triton_available(): File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\__init__.py", line 38, in func_wrapper value = func() File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\__init__.py", line 55, in _is_triton_available from xformers.triton.softmax import softmax as triton_softmax # noqa File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\triton\__init__.py", line 12, in <module> from .dropout import FusedDropoutBias, dropout # noqa File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\triton\dropout.py", line 13, in <module> import triton File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\triton\__init__.py", line 1, in <module> raise RuntimeError("Should never be installed") RuntimeError: Should never be installed
I`m using xformers 0.0.25.dev740 (0.0.24 was giving the same error) and torch 2.2.0+cu121, even having the CUDA Runtime 11.8 installed. At the requirements.txt it installed torch-2.2.0-cp310-cp310-win_amd64, but gave this error:
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.2.0+cu121 with CUDA 1201 (you have 2.2.0+cpu) Python 3.10.11 (you have 3.10.13)
It asked me then to install both ACCELERATE and TRITON, which was not in the requirements.. now I`m stuck on that long error..
Anyone could make it work or know how to solve it?
Thanks in advance!!
RoD
Hi @ExponentialML , I managed to evolve with the installation, and I`d like to share it with you, to see if you can help me and other Windows users that might being having the same problem trying to run your MotionDirector.
My steps, after yours (creating a conda env and installing all the requirements.txt) were:
1- I run everything inside a Git Bash console window;
2- Inside the Conda Environment I have installed:
Python 3.10, Cuda 11.8, torch-2.2.0+cu118, torchaudio-2.2.0+cu118, torchvision 0.17.0+cu118 and xformers 0.0.24+cu118.
3- after that missing Triton message, I found out that Triton is not officially ported to windows, but found a "triton-2.0.0-cp310-cp310-win_amd64.whl" file a user posted, and that "missing triton" message is gone!
But now, I have the following error when I try to execute the train.py:
Traceback (most recent call last): File "X:\ai\AnimateDiff-MotionDirector\train.py", line 20, in <module> import diffusers File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\diffusers\__init__.py", line 28, in <module> from .models import ( File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\diffusers\models\__init__.py", line 19, in <module> from .attention import Transformer2DModel File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\diffusers\models\attention.py", line 43, in <module> import xformers.ops File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\__init__.py", line 26, in <module> from .modpar_layers import ColumnParallelLinear, RowParallelLinear File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\modpar_layers.py", line 15, in <module> from .seqpar import sequence_parallel_leading_matmul, sequence_parallel_trailing_matmul File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\seqpar.py", line 18, in <module> from .sequence_parallel_fused_ops import ( File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\sequence_parallel_fused_ops.py", line 21, in <module> from ._triton.sequence_parallel_fused_kernels import ( File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\xformers\ops\_triton\sequence_parallel_fused_kernels.py", line 403, in <module> def _xformers_seqpar_matmul_kernel( File "C:\Users\Admin\anaconda3\envs\AnimateDiff-MotionDirector\lib\site-packages\triton\runtime\jit.py", line 389, in decorator return JITFunction(fn, **kwargs) TypeError: JITFunction.__init__() got an unexpected keyword argument 'debug'
Any idea on how to fix this issue?
Thanks!!! =)
PS.: the Triton windows version I`ve found is at https://huggingface.co/r4ziel/xformers_pre_built/tree/main