Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For what possible reasons you could remove older xformers versions? #708

Closed
FurkanGozukara opened this issue Mar 29, 2023 · 9 comments
Closed

Comments

@FurkanGozukara
Copy link

FurkanGozukara commented Mar 29, 2023

We were using xformers 0.0.17dev476 version very well with torch version 1 and cuda 11.7

Now you removed it and we have to use torch 2

However torch 2 is not working on unix runpod

Therefore we are not able to use runpod as we wanted as before

I cant find any radical explanation of removing all versions

So how can I obtain older versions?

Such as 0.0.17dev476

how can I compile it on unix machine?

Here my torch 2 problem on runpod unix

i am trying to run dreambooth on runpod

unfortunately pytorch team removed xformers older version

now we have to use torch 2
however it is not working on runpod

here the errors and steps i tried to solve the problem

I have installed Torch 2 via this command on RunPod io instance

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Everything installed perfectly fine

With Torch 1 and Cuda 11.7, I was not getting any error but with Torch 2 the below error produced

Could not load library libcudnn_cnn_infer.so.8. Error: libnvrtc.so: cannot open shared object file: No such file or directory

How to fix?

It is using unix

On Windows same prodecure working very well

Using Automatic1111 web UI to use Stable Diffusion

this above i couldnt solve

therefore i have done the following things

apt update
apt install sudo
sudo apt install nvidia-cudnn
sudo apt-get install python3-dev

after installing all above

now i have this warning and training never progress

Steps: 0%| | 0/170 [00:00<?, ?it/s][2023-03-29 18:50:26,163] torch._inductor.utils: [WARNING] not enough cuda cores to use max_autotune mode

now when i run below python code i see everything looking good

import torch

# Check if CUDA is available
if torch.cuda.is_available():
    print("CUDA is available")
    # Display the current GPU name
    print("GPU name: ", torch.cuda.get_device_name(torch.cuda.current_device()))
else:
    print("CUDA is not available")

# Verify the PyTorch version
print("PyTorch version: ", torch.__version__)

import torch
print(torch.cuda.get_device_properties(0).multi_processor_count)

test.py result

CUDA is available
GPU name:  NVIDIA RTX A4500
PyTorch version:  2.0.0+cu118
56

it is able to generate images with 15.58it which is very fast

any help appreciated very much

@danthe3rd
Copy link
Contributor

Hi,
We are limited by pypi/conda by the number of builds we can keep. Furthermore, on pypi we can only have a single Pytorch version per xFormers version. That's why we don't keep binaries for ever.
However, we have the latest version of XFormers for PT 1.12.1, 1.13.1 and 2.0.0 on anaconda that you can use

@FurkanGozukara
Copy link
Author

Hi, We are limited by pypi/conda by the number of builds we can keep. Furthermore, on pypi we can only have a single Pytorch version per xFormers version. That's why we don't keep binaries for ever. However, we have the latest version of XFormers for PT 1.12.1, 1.13.1 and 2.0.0 on anaconda that you can use

Hello. We can't use those. Torch 1.13.1 works with xformers 0.0.17 dev version for stable diffusion training and you removed all those versions

What kind of decision is this?

You even removed 0.0.14

Can you upload somewhere else we can manually install?

@danthe3rd
Copy link
Contributor

Version 0.0.16 works with PyTorch 1.13.1 and is still available on pip (https://pypi.org/project/xformers/0.0.16/).
Version 0.0.17 is also compatible with PyTorch 1.13.1 if you install it with conda within a conda environment (linux only):

conda install xformers -c xformers pytorch=1.13.1 torchvision torchaudio -c pytorch

@FurkanGozukara
Copy link
Author

Version 0.0.16 works with PyTorch 1.13.1 and is still available on pip (https://pypi.org/project/xformers/0.0.16/). Version 0.0.17 is also compatible with PyTorch 1.13.1 if you install it with conda within a conda environment (linux only):

conda install xformers -c xformers pytorch=1.13.1 torchvision torchaudio -c pytorch

0.0.16 is not compatible with stable diffusion training. You can remove that and add 0.0.17 please?

@ArrowM
Copy link

ArrowM commented Mar 29, 2023

Hi, We are limited by pypi/conda by the number of builds we can keep. Furthermore, on pypi we can only have a single Pytorch version per xFormers version. That's why we don't keep binaries for ever. However, we have the latest version of XFormers for PT 1.12.1, 1.13.1 and 2.0.0 on anaconda that you can use

Ahh, thank you for the explanation.

@FurkanGozukara
Copy link
Author

FurkanGozukara commented Mar 29, 2023

Version 0.0.16 works with PyTorch 1.13.1 and is still available on pip (https://pypi.org/project/xformers/0.0.16/). Version 0.0.17 is also compatible with PyTorch 1.13.1 if you install it with conda within a conda environment (linux only):

conda install xformers -c xformers pytorch=1.13.1 torchvision torchaudio -c pytorch

Can you upload somewhere latest 0.0.17 that is compatible with torch 1 and Cuda 11.7 for Unix systems?

@danthe3rd
Copy link
Contributor

Also, as it might help: our CI is still building wheels for previous versions of pytorch (like 1.13.1), but we just don't upload them to pypi due to only being able to have a single pytorch version per pypi version.
However you can download them manually and install them. Just click on the CI check on a commit, and select the wheel build you want
image
In the job summary, you can download the specific version for your OS/python version/pytorch version, for example here:
https://github.com/facebookresearch/xformers/actions/runs/4545653740

@FurkanGozukara
Copy link
Author

FurkanGozukara commented Mar 29, 2023

awesome testing ty so much @danthe3rd

@FurkanGozukara
Copy link
Author

@danthe3rd thank you so much for your help

with your help i made it work and prepared the tutorial

18.) RunPod - Automatic1111 Web UI - Cloud - Paid - No PC Is Required
RunPod Fix For DreamBooth & xFormers - How To Use Automatic1111 Web UI Stable Diffusion on RunPod

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants