Comments (14)
Unfortunately, this also replaces pytorch with the 2.0.1+cpu version, after which it proceeds to say that this version is incompatible with the current xformers installation because the cuda version is required. And it looks like tis repo uses the 1.12.1 version of torch, so neither is correct. What is the compatible xformers version for this version of pytorch? I've been figting with conda and pip for 3 hours. I would very much appreciate if someone more knowledgeable could kindly provide updated instructions on installing the requirements.
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu)
My best attempt was installing torch 2.0.1 with cuda:pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
Then install the latest xformers without the dependencies, so it wouldn't replace the torch with the cpu version:pip install xformers --no-deps
Then it gives me an error:Error caught was: No module named 'triton'
I also tried keeping torch 1.12.1 and installing xformers 0.0.16, but it required 1.12.1, the previous versions, 0.0.13 and 0.0.12 just failed to install via pip.Finally got this working! Windows 11 here with a 3090 and a total noob with Python.
Not sure which one of this did it, but:
Installed Torch 1.13.1+cu117
pip install torch==1.13.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
Was getting the same error you got, and installed triton manually, downloaded from here:
Installed it with
pip install <path to the downloaded whl>
Then got another error with Torchivision, but managed to solve it via installing Torchvision 0.14.1
pip install torchvision==0.14.1
After all of this, kept getting errors but it was just that I got impatient and didn't checkout stable diffusion as instructed.
With all of this, finally got it working.
Thank you,according to your method i run successfully.I installed xformers manually, using pip install xformers==0.0.16 --no-dependencies,then do the same as you,finally it got working, report no error.
from animatediff.
here is the steps work for me(windows 11):
- remove xformers from environment.yaml
conda env create -f environment.yaml
create conda environment with other dependencies.conda activate animatediff
enable environment.- download xformers offline package from https://anaconda.org/xformers/xformers/files, with pytorch1.12.1 and cuda11.3, the package should be xformers-0.0.16-py310_cu11.3_pyt1.12.1.tar.bz2.
- install offline package with command
conda install --use-local xformers-0.0.16-py310_cu11.3_pyt1.12.1.tar.bz2
if there is some other dependency error, install them with pip
I'm not an expert with environments in Conda. But won't this mess up xformers and pytorch for my default environment? Or will it only affect the animatediff one?
Also. does it not matter that these are Linux packages?
It won't effect your default environment even setup python version same as your system python version.
from animatediff.
remove xformers from channels and manually run pip install xformers
from animatediff.
Unfortunately, this also replaces pytorch with the 2.0.1+cpu version, after which it proceeds to say that this version is incompatible with the current xformers installation because the cuda version is required. And it looks like tis repo uses the 1.12.1 version of torch, so neither is correct. What is the compatible xformers version for this version of pytorch? I've been figting with conda and pip for 3 hours. I would very much appreciate if someone more knowledgeable could kindly provide updated instructions on installing the requirements.
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu)
My best attempt was installing torch 2.0.1 with cuda:
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
Then install the latest xformers without the dependencies, so it wouldn't replace the torch with the cpu version:
pip install xformers --no-deps
Then it gives me an error:
Error caught was: No module named 'triton'
I also tried keeping torch 1.12.1 and installing xformers 0.0.16, but it required 1.12.1, the previous versions, 0.0.13 and 0.0.12 just failed to install via pip.
from animatediff.
Same issue here, installation instructions seem a bit incomplete!
from animatediff.
Unfortunately, this also replaces pytorch with the 2.0.1+cpu version, after which it proceeds to say that this version is incompatible with the current xformers installation because the cuda version is required. And it looks like tis repo uses the 1.12.1 version of torch, so neither is correct. What is the compatible xformers version for this version of pytorch? I've been figting with conda and pip for 3 hours. I would very much appreciate if someone more knowledgeable could kindly provide updated instructions on installing the requirements.
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu)
My best attempt was installing torch 2.0.1 with cuda:
pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
Then install the latest xformers without the dependencies, so it wouldn't replace the torch with the cpu version:pip install xformers --no-deps
Then it gives me an error:Error caught was: No module named 'triton'
I also tried keeping torch 1.12.1 and installing xformers 0.0.16, but it required 1.12.1, the previous versions, 0.0.13 and 0.0.12 just failed to install via pip.
Finally got this working! Windows 11 here with a 3090 and a total noob with Python.
Not sure which one of this did it, but:
Installed Torch 1.13.1+cu117
pip install torch==1.13.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
Was getting the same error you got, and installed triton manually, downloaded from here:
Installed it with pip install <path to the downloaded whl>
Then got another error with Torchivision, but managed to solve it via installing Torchvision 0.14.1
pip install torchvision==0.14.1
After all of this, kept getting errors but it was just that I got impatient and didn't checkout stable diffusion as instructed.
With all of this, finally got it working.
from animatediff.
I just thought I'd put how I installed xformers here, as resolving the xformers dependency is initially confusing on windows, because conda doesn't have an xformers package, and not everyone wants wsl:
https://anaconda.org/xformers/xformers
So, first run your conda / miniconda prompt, and put:
python -m xformers.info
For me I saw something like this like this:
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu)
Python 3.10.11 (you have 3.10.9)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details
The next step I tried was was to use this page https://pytorch.org/get-started/locally/ which for pip gave me:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
And then running python -m xformers.info again, everything looked fine, but it still threw an error because pytorch only had cpu support, not gpu extensions. So don't use this. Then from inside a conda prompt (but no activated environment), I tried:
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
which actually wanted to downgrade a lot of my packages from 12.2 to 11.8, but "working" is better than "latest" even if it breaks something else. After this:
python -m xformers.info
Everything looks fine again with xformers 0.0.20 and cuda/gpu even without triton. So next I ran the animatediff step conda env create -f environment.yaml and I still got
ResolvePackageNotFound:
- xformers
So then conda activate animatediff and run:
pip install -U xformers
Anyway, this doesn't work either, same error as before.
So, the solution was then from inside your animatediff activated conda, run the same thing again:
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
Which will go much quicker second time around, and then animatediff will work!
from animatediff.
Unfortunately, this also replaces pytorch with the 2.0.1+cpu version, after which it proceeds to say that this version is incompatible with the current xformers installation because the cuda version is required. And it looks like tis repo uses the 1.12.1 version of torch, so neither is correct. What is the compatible xformers version for this version of pytorch? I've been figting with conda and pip for 3 hours. I would very much appreciate if someone more knowledgeable could kindly provide updated instructions on installing the requirements.
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.0.1+cu118 with CUDA 1108 (you have 2.0.1+cpu)
My best attempt was installing torch 2.0.1 with cuda:pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 --extra-index-url https://download.pytorch.org/whl/cu118
Then install the latest xformers without the dependencies, so it wouldn't replace the torch with the cpu version:pip install xformers --no-deps
Then it gives me an error:Error caught was: No module named 'triton'
I also tried keeping torch 1.12.1 and installing xformers 0.0.16, but it required 1.12.1, the previous versions, 0.0.13 and 0.0.12 just failed to install via pip.Finally got this working! Windows 11 here with a 3090 and a total noob with Python.
Not sure which one of this did it, but:
Installed Torch 1.13.1+cu117
pip install torch==1.13.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
Was getting the same error you got, and installed triton manually, downloaded from here:
https://cdn-lfs.huggingface.co/repos/67/d8/67d8d3794e8867d8cc3b6339a66747ce451a233ea604578bba1e2cbf541c42d9/91a6ec395022743269c942df7af01b210f642fb633d146a811be05a455adbae2?response-content-disposition=attachment%3B+filename*%3DUTF-8%27%27triton-2.0.0-cp310-cp310-win_amd64.whl%3B+filename%3D%22triton-2.0.0-cp310-cp310-win_amd64.whl%22%3B&Expires=1689728222&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTY4OTcyODIyMn19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy5odWdnaW5nZmFjZS5jby9yZXBvcy82Ny9kOC82N2Q4ZDM3OTRlODg2N2Q4Y2MzYjYzMzlhNjY3NDdjZTQ1MWEyMzNlYTYwNDU3OGJiYTFlMmNiZjU0MWM0MmQ5LzkxYTZlYzM5NTAyMjc0MzI2OWM5NDJkZjdhZjAxYjIxMGY2NDJmYjYzM2QxNDZhODExYmUwNWE0NTVhZGJhZTI%7EcmVzcG9uc2UtY29udGVudC1kaXNwb3NpdGlvbj0qIn1dfQ__&Signature=V5r1FeUWxyWNLpGlnvpQffYPxJTSl3fl4Re3EzIam5crcNeMj6eUlM5L%7E0gRKpRG8mYUK8dRVeOC9836beqIIdUEyLlGCdAkVyfF2kfuWwpEP%7E5smqZ-Dc9Hw5JGb%7EP69xNnA1VG3OfVesHPgM1wkVUuUoOaPf1fchS0jEr4NZBv7E8NX-%7ENwnF2mBrr%7E2sRvy1mMB1igN9vSKtxsmZtsHd0JZB1nvWZpYXftBtGUnV6NlFMeCXuxS97tmTRFqG%7EEhEtjCu6dpkYMgnwa2ZWGgfVJm1zQ9r5kpkFkAGDOKEfI33CNR4bZRMC5MT53yesDYqYSagwIegnJwU9sHj71w__&Key-Pair-Id=KVTP0A1DKRTAX
Installed it withpip install <path to the downloaded whl>
Then got another error with Torchivision, but managed to solve it via installing Torchvision 0.14.1
pip install torchvision==0.14.1
After all of this, kept getting errors but it was just that I got impatient and didn't checkout stable diffusion as instructed.
With all of this, finally got it working.Thank you,according to your method i run successfully.I installed xformers manually, using pip install xformers==0.0.16 --no-dependencies,then do the same as you,finally it got working, report no error.
我最终可以成功运行,但是遇到了新的报错,不知道你们是不是忽略了,还是只有我遇到了,因为它不影响生成 gif 图片,报错内容如下:
I can finally run it successfully, but I encountered a new error report. I don’t know if you have ignored it, or I am the only one who encountered it, because it does not affect the generation of gif images. The content of the error report is as follows:
(animatediff) C:\Users\Administrator\AnimateDiff>python -m scripts.animate --config configs/prompts/baijin.yaml
A matching Triton is not available, some optimizations will not be enabled.
Error caught was: DLL load failed while importing libtriton: 找不到指定的模块。
我不知道什么原因,我的情况是这样
I don't know why, my situation is like this
from animatediff.
here is the steps work for me(windows 11):
- remove xformers from environment.yaml
conda env create -f environment.yaml
create conda environment with other dependencies.conda activate animatediff
enable environment.- download xformers offline package from https://anaconda.org/xformers/xformers/files, with pytorch1.12.1 and cuda11.3, the package should be xformers-0.0.16-py310_cu11.3_pyt1.12.1.tar.bz2.
- install offline package with command
conda install --use-local xformers-0.0.16-py310_cu11.3_pyt1.12.1.tar.bz2
if there is some other dependency error, install them with pip
from animatediff.
here is the steps work for me(windows 11):
- remove xformers from environment.yaml
conda env create -f environment.yaml
create conda environment with other dependencies.conda activate animatediff
enable environment.- download xformers offline package from https://anaconda.org/xformers/xformers/files, with pytorch1.12.1 and cuda11.3, the package should be xformers-0.0.16-py310_cu11.3_pyt1.12.1.tar.bz2.
- install offline package with command
conda install --use-local xformers-0.0.16-py310_cu11.3_pyt1.12.1.tar.bz2
if there is some other dependency error, install them with pip
I'm not an expert with environments in Conda. But won't this mess up xformers and pytorch for my default environment? Or will it only affect the animatediff one?
Also. does it not matter that these are Linux packages?
from animatediff.
I tested the following environment.yaml
on a Windows PC with a 3090, and it got working with no error. Let me know if it works for you.
name: animatediff
channels:
- pytorch
- nvidia
dependencies:
- python=3.10
- pytorch=1.13.1
- torchvision=0.14.1
- torchaudio=0.13.1
- pytorch-cuda=11.7
- pip
- pip:
- diffusers==0.11.1
- transformers==4.25.1
- xformers==0.0.16
- imageio==2.27.0
- gdown
- einops
- omegaconf
- safetensors
- gradio
from animatediff.
I tested the following
environment.yaml
on a Windows PC with a 3090, and it got working with no error. Let me know if it works for you.name: animatediff channels: - pytorch - nvidia dependencies: - python=3.10 - pytorch=1.13.1 - torchvision=0.14.1 - torchaudio=0.13.1 - pytorch-cuda=11.7 - pip - pip: - diffusers==0.11.1 - transformers==4.25.1 - xformers==0.0.16 - imageio==2.27.0 - gdown - einops - omegaconf - safetensors - gradio
I've got below error message when run by gradio!
Please check this!
=============================================
(animatediff) C:\Users\USER\Documents\AnimateDiff>python app.py
A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
C:\Users\USER\Documents\AnimateDiff\app.py:283: GradioDeprecationWarning: The style
method is deprecated. Please set these arguments in the constructor instead.
with gr.Row().style(equal_height=False):
Running on local URL: http://127.0.0.1:7860
Running on public URL: https://fe04b4faa37389547f.gradio.live
from animatediff.
I tested the following
environment.yaml
on a Windows PC with a 3090, and it got working with no error. Let me know if it works for you.name: animatediff channels: - pytorch - nvidia dependencies: - python=3.10 - pytorch=1.13.1 - torchvision=0.14.1 - torchaudio=0.13.1 - pytorch-cuda=11.7 - pip - pip: - diffusers==0.11.1 - transformers==4.25.1 - xformers==0.0.16 - imageio==2.27.0 - gdown - einops - omegaconf - safetensors - gradio
I've got below error message when run by gradio! Please check this!
============================================= (animatediff) C:\Users\USER\Documents\AnimateDiff>python app.py A matching Triton is not available, some optimizations will not be enabled. Error caught was: No module named 'triton' C:\Users\USER\Documents\AnimateDiff\app.py:283: GradioDeprecationWarning: The
style
method is deprecated. Please set these arguments in the constructor instead. with gr.Row().style(equal_height=False): Running on local URL: http://127.0.0.1:7860 Running on public URL: https://fe04b4faa37389547f.gradio.live
Just run pip install triton
to fix that problem.
from animatediff.
here is the steps work for me(windows 11):
- remove xformers from environment.yaml
conda env create -f environment.yaml
create conda environment with other dependencies.conda activate animatediff
enable environment.- download xformers offline package from https://anaconda.org/xformers/xformers/files, with pytorch1.12.1 and cuda11.3, the package should be xformers-0.0.16-py310_cu11.3_pyt1.12.1.tar.bz2.
- install offline package with command
conda install --use-local xformers-0.0.16-py310_cu11.3_pyt1.12.1.tar.bz2
if there is some other dependency error, install them with pip
Thank you, this is very useful
from animatediff.
Related Issues (20)
- RuntimeError: mixed dtype (CPU): expect parameter to have scalar type of Float [COMFYUI] HOT 2
- controlnet checkpoint load error
- The weights obtained from training cannot be used HOT 2
- Animatediff has a relatively large negative impact on image generation. HOT 1
- IndexError: list index out of range Error when using img2img
- Sorry, asked in wrong github repo.
- could you please provide the training code for SparseCtrl?
- No module named 'omegaconf' HOT 1
- sparsectrl 4090显存都不够
- I use image_finetune.yaml to fine-tune the model, and I found that the first step of each epoch would get stuck for 5 minutes HOT 5
- ModuleNotFoundError: No module named 'scripts.animatediff_mm'
- AttributeError: 'UiControlNetUnit' object has no attribute 'enable'
- MotionLoRA training HOT 2
- Wall of Error messages: "Error running before_process", "Missing keys from State_dict", "AttributeError: 'CFGDenoiserParams' object has no attribute 'denoiser'". and even "Shape mismatch, can't divide axis of length 2 in chunks of 16"
- AnimateDiff v2 runs fine, v3 throws error (MotionWrapper state_dict / enable_gn_hack errors)
- animatediff_mm.py", line 43, in load raise RuntimeError("Please download models manually.")
- How to generate a gif image with pure green background? HOT 2
- Reproducing inference with depth maps
- Asking for image layer in Unet training HOT 1
- difference between finetuning the unet's image layers and training motion modules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from animatediff.