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

Error running 1.5

Open Dreason8 opened this issue 2 years ago • 34 comments

Getting the following error all of a sudden when trying to run 1.5 model.

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in from modules import shared, devices, sd_samplers, upscaler, extensions, localization File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_samplers.py", line 11, in from modules import prompt_parser, devices, processing, images File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 15, in import modules.sd_hijack File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack.py", line 30, in ldm.modules.attention.BasicTransformerBlock.ATTENTION_MODES["softmax-xformers"] = ldm.modules.attention.CrossAttention AttributeError: type object 'BasicTransformerBlock' has no attribute 'ATTENTION_MODES'

Appreciate any help thanks

Dreason8 avatar Nov 26 '22 13:11 Dreason8

Same.

Gero39 avatar Nov 26 '22 14:11 Gero39

There were a lot of changes the last two days, to it's better to remove/rename the folder "sd" in your gdrive and do a clean run.

latest colabs: https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb

TheLastBen avatar Nov 26 '22 14:11 TheLastBen

That's what I assumed, but I just tried deleting the SD folder and doing a clean run and still getting the same error.

Also getting this error trying to run 2.0 model:

Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in from modules import shared, devices, sd_samplers, upscaler, extensions, localization File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py", line 17, in from modules import sd_samplers, sd_models, localization, sd_vae, extensions, script_loading File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_samplers.py", line 11, in from modules import prompt_parser, devices, processing, images File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 15, in import modules.sd_hijack File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack.py", line 11, in import modules.textual_inversion.textual_inversion File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 13, in from modules import shared, devices, sd_hijack, processing, sd_models, images, sd_samplers File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/images.py", line 20, in from modules.shared import opts, cmd_opts ImportError: cannot import name 'opts' from 'modules.shared' (/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py)

Dreason8 avatar Nov 26 '22 14:11 Dreason8

Following for updates. Really need to get 1.5 running today to complete a project. Any ideas on possibilities of things resuming? Thanks for your hard work.

MysticSpiderman avatar Nov 26 '22 14:11 MysticSpiderman

Following for updates. Really need to get 1.5 running today to complete a project. Any ideas on possibilities of things resuming? Thanks for your hard work.

I'll check it out

TheLastBen avatar Nov 26 '22 15:11 TheLastBen

Did you run the "requirements" cell after switching from v2 to v1.5 ?

TheLastBen avatar Nov 26 '22 15:11 TheLastBen

content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py

This file is installed by the requirements cell

TheLastBen avatar Nov 26 '22 15:11 TheLastBen

Just tried training on fast-DreamBooth - confirming the same error as mentioned above.

Where abouts is the cell for "requirements?" Not seeing it.

MysticSpiderman avatar Nov 26 '22 15:11 MysticSpiderman

Yes ran the requirements cell after changing models

Dreason8 avatar Nov 26 '22 15:11 Dreason8

I am getting:: Downloading: "https://github.com/DagnyT/hardnet/raw/master/pretrained/train_liberty_with_aug/checkpoint_liberty_with_aug.pth" to /root/.cache/torch/hub/checkpoints/checkpoint_liberty_with_aug.pth 100% 5.10M/5.10M [00:00<00:00, 163MB/s] Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in <module> from modules import shared, devices, sd_samplers, upscaler, extensions, localization File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_samplers.py", line 11, in <module> from modules import prompt_parser, devices, processing, images File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 15, in <module> import modules.sd_hijack File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack.py", line 31, in <module> ldm.modules.attention.BasicTransformerBlock.ATTENTION_MODES["softmax-xformers"] = ldm.modules.attention.CrossAttention AttributeError: type object 'BasicTransformerBlock' has no attribute 'ATTENTION_MODES'

I am using a Link_CKPT @ https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

I've run all cells.

FollowMarcos avatar Nov 26 '22 15:11 FollowMarcos

A1111 just added the V2 support, so I have to remove the manual support I added. will be fixed soon

TheLastBen avatar Nov 26 '22 15:11 TheLastBen

<3

FollowMarcos avatar Nov 26 '22 15:11 FollowMarcos

Thanks, Hoping 1.5 support remains as it's a much better model compared to v2 in it's current state.

Dreason8 avatar Nov 26 '22 15:11 Dreason8

can confirm, facing the same issue and same stack trace. Have run all the cells

shekit avatar Nov 26 '22 15:11 shekit

same problem here. any solutions?

spmadv avatar Nov 26 '22 15:11 spmadv

same problem here. any solutions?

@TheLastBen is fixing it, just wait man

luci9t avatar Nov 26 '22 15:11 luci9t

fixed https://github.com/TheLastBen/fast-stable-diffusion/commit/9b6f4424dc6bc85cd4588181ba0680686e778947, should work now https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast_stable_diffusion_AUTOMATIC1111.ipynb

TheLastBen avatar Nov 26 '22 16:11 TheLastBen

Thanks Man

Subaru17 avatar Nov 26 '22 16:11 Subaru17

Excuse me if I am missing something TheLastBen - but does the above working version allow us to train models to likeness? I am not seeing that option. Or is that a seperate collab from dreambooth? Either way - My task is to resume training models to likeness. So standing by for any updates. Appreciate your hard work, thank you.

MysticSpiderman avatar Nov 26 '22 16:11 MysticSpiderman

@MysticSpiderman this is the colab for Dreambooth : https://colab.research.google.com/github/TheLastBen/fast-stable-diffusion/blob/main/fast-DreamBooth.ipynb

TheLastBen avatar Nov 26 '22 16:11 TheLastBen

I keep getting ModuleNotFoundError: No module named 'open_clip' for fast dreambooth. Retry with new link from your repo many times.

Edited: Its finally working flawless for me now on fast dreambooth. Thank you ben!

codenan42 avatar Nov 26 '22 16:11 codenan42

Training a model now in dreambooth. Fingers crossed.

MysticSpiderman avatar Nov 26 '22 16:11 MysticSpiderman

getting a new error now in the updated inference notebook. Any ideas? or do I need to retrain my model

Traceback (most recent call last):
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/webui.py", line 13, in <module>
    from modules import shared, devices, sd_samplers, upscaler, extensions, localization
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py", line 17, in <module>
    from modules import sd_samplers, sd_models, localization, sd_vae, extensions, script_loading
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_samplers.py", line 11, in <module>
    from modules import prompt_parser, devices, processing, images
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/processing.py", line 15, in <module>
    import modules.sd_hijack
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_hijack.py", line 11, in <module>
    import modules.textual_inversion.textual_inversion
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/textual_inversion/textual_inversion.py", line 13, in <module>
    from modules import shared, devices, sd_hijack, processing, sd_models, images, sd_samplers
  File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/images.py", line 20, in <module>
    from modules.shared import opts, cmd_opts
ImportError: cannot import name 'opts' from 'modules.shared' (/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/shared.py)

shekit avatar Nov 26 '22 16:11 shekit

deleting the sd folder and rerunning the notebook seems to have solved this.

shekit avatar Nov 26 '22 17:11 shekit

Ran into this same issue. I thought I had already cleared all my files from my drive. Deleting the sd folder and trying again.

MysticSpiderman avatar Nov 26 '22 17:11 MysticSpiderman

Ran into this same issue. I thought I had already cleared all my files from my drive. Deleting the sd folder and trying again.

A1111 just added the V2 support so I had to reshape the colab, it works fine now

TheLastBen avatar Nov 26 '22 17:11 TheLastBen

Thanks @TheLastBen! Great support. Also, please consider adding a donate button somewhere to your Github.

a-toms avatar Nov 26 '22 18:11 a-toms

Trying again to get the fast-dreamboth working with a trained model. Glad to see others getting it working. Cleared my gdrive fully.

MysticSpiderman avatar Nov 26 '22 19:11 MysticSpiderman

Happy to say that it is up and running again. Thanks so much Ben

MysticSpiderman avatar Nov 26 '22 19:11 MysticSpiderman

Can confirm, it works fine now. Thanks for the hard work Ben!

norfuer avatar Nov 26 '22 22:11 norfuer