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

Remove bitsandbytes version to fix CUDA version 12x compatible problem #465

Closed
wants to merge 1 commit into from
Closed

Remove bitsandbytes version to fix CUDA version 12x compatible problem #465

wants to merge 1 commit into from

Conversation

ArtificialCleverness
Copy link

No description provided.

@ArtificialCleverness
Copy link
Author

It might fix following issues:
#270
#188

@kohya-ss
Copy link
Owner

Thank you for this! It is a good idea in general.

However, I worry if this will work in a windows environment. I think rewriting main.py or cextension.py in the latent bitsandbytes may not work.

It might be a good idea to describe the installation instruction in Linux as an option. But I do not have time to test with Linux environment...

@ArtificialCleverness ArtificialCleverness marked this pull request as draft April 30, 2023 03:20
@ArtificialCleverness
Copy link
Author

I have done my testing on RTX4090 + cu121 + python3.10.11 + Ubuntu 22.04, it works fine for me. I think GUI contributor also have done the testing on Windows. Please check the discussions below.
bmaltais/kohya_ss#686
bmaltais/kohya_ss#684

@ArtificialCleverness ArtificialCleverness marked this pull request as ready for review April 30, 2023 03:28
@ArtificialCleverness
Copy link
Author

Also, I do think 'bitsandbytes' is currently under developing, there are many compatible issues. I have read many issues discussing cuda12x problems. I also have done trying many installation/compilation methods they given, but only this one works for me. TimDettmers/bitsandbytes#185

@kohya-ss
Copy link
Owner

Thank you for update!

It seems that the version of bitsandbytes in the Windows is still 0.35.0 according to requirements.txt. Then I think it will work on Windows without any problem.

But I worry that if some people train on a Linux environment with CUDA 11.x, or on Colab, it may not work if we change bitsandbytes to this version.

I cannot test this myself and am concerned that it will affect these people.

@ArtificialCleverness
Copy link
Author

Your concern is definitely correct, I think bitsandbytes is currently working on this according to their plan recently, and I found an open PR adding docs about this.
TimDettmers/bitsandbytes#337

GUI version has already merged this PR regarding b&b version, and we could just observe whether people is getting new errors about env. Also, I do not think we are able to do a comprehensive test on Linux or giving detailed instructions about bitsandbytes installation, I think we just wait bitsandbytes to fix their issue would be a better idea, since they are currently working on cu12x supports.

@kohya-ss
Copy link
Owner

kohya-ss commented May 2, 2023

Thank you for your comment.

So I would like to keep an eye on the GUI repository a little longer. Also, I checked the bitsandbytes repository and it seems that not only CUDA 12 but also 11 are supported, so Colab may not have any problems.

@hemslo
Copy link

hemslo commented Jun 13, 2023

I'm having a similar issue and was about to raise a PR like this, I'm using bitsandbytes==0.39.0

Tested in RTX4070, cuda 12.2, python 3.10.11, pytorch 1.31.1, Ubuntu 22.04.

My linux install steps are:

# https://pytorch.org/get-started/previous-versions/#linux-and-windows-2
conda install pytorch==1.13.1 torchvision==0.14.1 torchaudio==0.13.1 pytorch-cuda=11.7 -c pytorch -c nvidia

pip install --upgrade -r requirements.txt

# https://github.com/facebookresearch/xformers#installing-xformers
conda install xformers -c xformers

@ArtificialCleverness ArtificialCleverness closed this by deleting the head repository Feb 16, 2024
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

Successfully merging this pull request may close these issues.

None yet

3 participants