ShivamShrirao / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch
https://huggingface.co/docs/diffusers
Apache License 2.0
1.89k stars 506 forks source link

Torch 2 is breaking the famous Google Colab need urgent fix #225

Open FurkanGozukara opened 1 year ago

FurkanGozukara commented 1 year ago

Describe the bug

https://colab.research.google.com/github/ShivamShrirao/diffusers/blob/main/examples/dreambooth/DreamBooth_Stable_Diffusion.ipynb

For torch 2, we need cuda 11.8 and xformers 0.0.18

image

@ShivamShrirao

Reproduction

posted

Logs

No response

System Info

posted

christopherritter commented 1 year ago

I have been experiencing this bug since yesterday and am unable to locate a workaround.

FurkanGozukara commented 1 year ago

I have been experiencing this bug since yesterday and am unable to locate a workaround.

I found a way on runpod but don't know for shivam colab yet.

Here my runpod solution

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

jmaccall316 commented 1 year ago

This from chatGPT3:

This error occurs because the currently installed version of Torch conflicts with the version required by some of the packages you are trying to install. To resolve this issue, you can try the following steps:

Upgrade or downgrade the conflicting packages:
a. If you need to use the specific version of the conflicting packages, then you can downgrade the Torch version to the required version by running pip install torch==1.13.1.
b. If you can use a different version of the conflicting packages, then you can upgrade them to versions that are compatible with the currently installed version of Torch by running pip install torchvision torchtext torchaudio fastai --upgrade.

Remove conflicting packages and install them again:
a. Remove the conflicting packages using pip uninstall <package_name> command for each package.
b. Install the packages again with the correct version of Torch by running pip install torchvision==0.14.1+cu116 torchtext==0.14.1 torchaudio==0.13.1+cu116 fastai==2.7.11.

Create a virtual environment with the correct dependencies:
a. Create a new virtual environment by running python -m venv <env_name>.
b. Activate the virtual environment by running source <env_name>/bin/activate.
c. Install the required packages with the correct version of Torch by running pip install torchvision==0.14.1+cu116 torchtext==0.14.1 torchaudio==0.13.1+cu116 fastai==2.7.11.

By following one of these approaches, you should be able to resolve the dependency conflicts and install the required packages with the correct version of Torch.

All I did was !pip install torchvision torchtext torchaudio fastai --upgrade Model turned out okay. Also solved the Python extension: {e} loading error.

FurkanGozukara commented 1 year ago

I just tested today even though warning and error messages it works But not sure if works as 100% quality