Linaqruf / kohya-trainer

Adapted from https://note.com/kohya_ss/n/nbf7ce8d80f29 for easier cloning
Apache License 2.0
1.82k stars 296 forks source link

DREAMBOOTH CUDA SETUP: Setup Failed! #320

Open k0xxxx opened 7 months ago

k0xxxx commented 7 months ago

Hello, please tell me, I am launching on google colab https://colab.research.google.com/github/Linaqruf/kohya-trainer/blob/main/kohya-LoRA-dreambooth.ipynb#scrollTo=p_SHtbFwHVl1, but at the training launch stages A lot of errors appear, although just yesterday everything was working. Any ideas how to fix it?

image image image image image image

toshimickey commented 7 months ago

samme issue here

PlumButa commented 7 months ago

Same issue 😢 I noticed that the following error message appears during step "1.1. Install Dependencies":

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behavior is the source of the following dependency conflicts. pandas-gbq 0.19.2 requires google-auth-oauthlib>=0.7.0, but you have google-auth-oauthlib 0.4.6 which is incompatible.

Could it be related to this error message? 螢幕擷取畫面 2023-12-15 135834

DEX-1101 commented 7 months ago

CUDA backend failed to initialize: Found CUDA version 12010, but JAX was built against version 12020, which is newer. The copy of CUDA that is installed must be at least as new as the version against which JAX was built. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.

the error is caused by CUDA, the other repo is also same getting same error

Omenizer commented 7 months ago

Same issue, error in the dependencies, and when training starts I'm getting the CUDA error

chelseasn0210 commented 7 months ago

I'm having the same issue

SkyProlk2022 commented 7 months ago

I'm having the same issue too

kerlina1939 commented 7 months ago

Maybe this method can be used https://github.com/hollowstrawberry/kohya-colab/issues/69 It seems to be effective, but I don’t know where to add !pip install --upgrade bitsandbytes . If anyone knows how to use it, please take a screenshot, I would like to know how to use it. Thanks! !

Atheuz commented 7 months ago

Create a new cell and execute this:

!wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh

Then create another new cell and execute this:

!bash install_cuda.sh 118  /usr/local/ 0

That worked for me.

The problem appears to be that CUDA 11.8 is not installed, but 12.2 is, the colab notebook expects 11.8. The above installs CUDA 11.8 again.

Though this feels like a bandaid, the other fix seems better, but I haven't tried it.

wesleywil commented 7 months ago

Create a new cell and execute this:

!wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh

Then create another new cell and execute this:

!bash install_cuda.sh 118  /usr/local/ 0

That worked for me.

The problem appears to be that CUDA 11.8 is not installed, but 12.2 is, the colab notebook expects 11.8. The above installs CUDA 11.8 again.

This work for me as well, thanks man

chelseasn0210 commented 7 months ago

Create a new cell and execute this:


!wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh

Then create another new cell and execute this:


!bash install_cuda.sh 118  /usr/local/ 0

That worked for me.

The problem appears to be that CUDA 11.8 is not installed, but 12.2 is, the colab notebook expects 11.8. The above installs CUDA 11.8 again.

Though this feels like a bandaid, the other fix seems better, but I haven't tried it.

Is this done before mounting to Google Drive? Or is this done after?

SkyProlk2022 commented 7 months ago

Create a new cell and execute this:

!wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh

Then create another new cell and execute this:

!bash install_cuda.sh 118  /usr/local/ 0

That worked for me.

The problem appears to be that CUDA 11.8 is not installed, but 12.2 is, the colab notebook expects 11.8. The above installs CUDA 11.8 again.

Though this feels like a bandaid, the other fix seems better, but I haven't tried it.

Thank you sir!! It's working

SkyProlk2022 commented 7 months ago

Create a new cell and execute this:


!wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh

Then create another new cell and execute this:


!bash install_cuda.sh 118  /usr/local/ 0

That worked for me. The problem appears to be that CUDA 11.8 is not installed, but 12.2 is, the colab notebook expects 11.8. The above installs CUDA 11.8 again. Though this feels like a bandaid, the other fix seems better, but I haven't tried it.

Is this done before mounting to Google Drive? Or is this done after?

It worked for me when I did it before

chelseasn0210 commented 7 months ago

Create a new cell and execute this:


!wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh

Then create another new cell and execute this:


!bash install_cuda.sh 118  /usr/local/ 0

That worked for me.

The problem appears to be that CUDA 11.8 is not installed, but 12.2 is, the colab notebook expects 11.8. The above installs CUDA 11.8 again.

Though this feels like a bandaid, the other fix seems better, but I haven't tried it.

Is this done before mounting to Google Drive? Or is this done after?

It worked for me when I did it before

It worked!!! Thank you so much 🙌

Linaqruf commented 7 months ago

current state explained here, thank you for waiting https://github.com/Linaqruf/kohya-trainer/issues/321#issuecomment-1861318632 let me know if it's still throw error

MajorGruberth commented 6 months ago

I still have the Coda-problem: I installed the 2 extra cells with de-install CUDA 12.2 and install 11.8, but the notebook still ceased to work with the same error at 4.2.1 I pushed the 2 extra cells on top, didn't work, I pushed them behind the dependencies cell - didn't work. How come?

Omenizer commented 6 months ago

You don't need the cells, the bug has been fixed

MajorGruberth commented 6 months ago

Well, I tried a fresh notebook kohya-LoRA-dreambooth.ipynb and found the good old error again: "Cuda backend failed to initialize...found cuBLAS version 120103..."

Omenizer commented 6 months ago

Did it work?

MajorGruberth commented 6 months ago

Nope... see above. Same error :-(

Omenizer commented 6 months ago

I'm asking because the author wrote that the error might still appear but the notebook would work, which is how it has been for me since his fix

MajorGruberth commented 6 months ago

Then I am wondering, why it's not working here...? Same platform, same notebook - different results?