Seeing error in the colab file run

#28
by aiartcreator - opened

Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 14, in
from modules import shared, devices, sd_samplers, upscaler, extensions, localization, ui_tempdir
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_samplers.py", line 8, in
import k_diffusion.sampling
File "/content/gdrive/MyDrive/sd/stable-diffusion/src/k-diffusion/k_diffusion/init.py", line 1, in
from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
File "/content/gdrive/MyDrive/sd/stable-diffusion/src/k-diffusion/k_diffusion/external.py", line 6, in
from . import sampling, utils
File "/content/gdrive/MyDrive/sd/stable-diffusion/src/k-diffusion/k_diffusion/sampling.py", line 7, in
import torchsde
ModuleNotFoundError: No module named 'torchsde'

I have the same problem

I had the same issue but was able to fix it in the end. Let me prephrase my solution by saying that I know absolutely nothing about coding and just kinda tried doing some logical steps though trial and error, so some of it might be redundant, for which I am very sorry.

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.

I hope this helped!

Small edit: 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.

This works, @greentree . Thank you

aiartcreator changed discussion status to closed
aiartcreator changed discussion status to open

Just keeping this open, but the problem is resolved

Shall I close this then?

Yes this can be closed. There is another thread running for the issue with Jac. Thanks

aiartcreator changed discussion status to closed

Sign up or log in to comment