Colab error solution! (For now)

#29
by greentree - opened

Recently, the colab linked on the model page has been throwing an error. I experimented around a bit and found the following fix (there might be redundancies in it):

First, if you've already run the function that installs the repo, go to your google drive and delete the folder it created. Wait about 5 minutes to ensure everything is actually gone, since google drive handles this very slowly.
Then return to the colab and make a new cell in between the bottom two, paste the following into it:

%cd /content/gdrive/MyDrive/sd/stable-diffusion-webui/modules
!$fgitclone https://github.com/google-research/torchsde
!$fgitclone https://github.com/huggingface/safetensors
!$fgitclone https://github.com/mlfoundations/open_clip
!pip install torchsde
!pip install safetensors
!pip install open_clip_torch

Then, in the last cell, check both of the boxes labeled "Use_Gradio_Server" and "Hypernetwork_Compatibility"

Now return to your google drive. Go to sd/stable-diffusion-webui/modules
Open the file named sd_hijack.py (you can do this by right clicking it and then selecting any of the options from "open with") and delete lines 30 and 31. Save it.

Now return to the colab and run all. It should work and give you a gradio link as intended, at least it did that for me. I don't know if all the features will still work after this fix though, can't say I've tested it. Might be unrelated but if the page hangs, refreshing it will work.

To avoid having to do this each time, make a copy of the notebook, which will include the cell that you just created, then just use your copy next time.

Hope it works!

Tested working on 29. Nov.

greentree changed discussion status to closed

Sign up or log in to comment