fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

No module named 'ldm.models.diffusion.sampling_util'

Open thekevinscott opened this issue 2 years ago • 6 comments

Running the colab notebook fast-DreamBooth.ipynb. Training seems to complete fine, but running the UI produces:

Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 15, in <module>
    from modules import import_hook, errors, extra_networks, ui_extra_networks_checkpoints
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui_extra_networks_checkpoints.py", line 6, in <module>
    from modules import shared, ui_extra_networks, sd_models
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 17, in <module>
    from modules.sd_hijack_inpainting import do_inpainting_hijack
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack_inpainting.py", line 14, in <module>
    from ldm.models.diffusion.sampling_util import norm_thresholding
ModuleNotFoundError: No module named 'ldm.models.diffusion.sampling_util'

thekevinscott avatar Mar 04 '23 20:03 thekevinscott

Just tried with https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb#scrollTo=PjzwxTkPSPHf and got the same error

thekevinscott avatar Mar 04 '23 21:03 thekevinscott

try test running the notebook without the first cell

TheLastBen avatar Mar 04 '23 21:03 TheLastBen

Had the same issue

Fix:

  1. Rename /content/gdrive/MyDrive/sd/stable-diffusion-webui to /content/gdrive/MyDrive/sd/stable-diffusion-webui-old.
  2. Reinstall dependencies.
  3. New ...webui folder will be fixed and working.

danielgwilson avatar Mar 05 '23 02:03 danielgwilson

This is annoying, I have to reinstall all the extensions

loboere avatar Mar 05 '23 07:03 loboere

This is annoying, I have to reinstall all the extensions

Yes. How we deal with it @TheLastBen? I guess all extension not work properly when we have to relaunch again?

cerarslan avatar Mar 05 '23 08:03 cerarslan

Rename the current SD folder, then copy the extension back to the new SD folder

TheLastBen avatar Mar 05 '23 09:03 TheLastBen

Following the comment by @danielgwilson fixed my issue. Thanks all!

thekevinscott avatar Apr 01 '23 18:04 thekevinscott