TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.55k stars 1.31k forks source link

Error running 1.5 #640

Open Dreason8 opened 1 year ago

Dreason8 commented 1 year ago

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

Gero39 commented 1 year ago

Same.

TheLastBen commented 1 year ago

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

Dreason8 commented 1 year ago

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)

MysticSpiderman commented 1 year ago

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.

TheLastBen commented 1 year ago

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 commented 1 year ago

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

TheLastBen commented 1 year ago

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

This file is installed by the requirements cell

MysticSpiderman commented 1 year ago

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

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

Dreason8 commented 1 year ago

Yes ran the requirements cell after changing models

FollowMarcos commented 1 year ago

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.

TheLastBen commented 1 year ago

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

FollowMarcos commented 1 year ago

<3

Dreason8 commented 1 year ago

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

shekit commented 1 year ago

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

spmadv commented 1 year ago

same problem here. any solutions?

luci9t commented 1 year ago

same problem here. any solutions?

@TheLastBen is fixing it, just wait man

TheLastBen commented 1 year ago

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

Subaru17 commented 1 year ago

Thanks Man

MysticSpiderman commented 1 year ago

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.

TheLastBen commented 1 year ago

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

codenan42 commented 1 year ago

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!

MysticSpiderman commented 1 year ago

Training a model now in dreambooth. Fingers crossed.

shekit commented 1 year ago

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 commented 1 year ago

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

MysticSpiderman commented 1 year ago

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

TheLastBen commented 1 year ago

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

a-toms commented 1 year ago

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

MysticSpiderman commented 1 year ago

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

MysticSpiderman commented 1 year ago

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

norfuer commented 1 year ago

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

TheLastBen commented 1 year ago

@a-toms there is a "Sponsor this project" button in the main repo page.

Gero39 commented 1 year ago

image Still getting this error...

TheLastBen commented 1 year ago

image Still getting this error...

remove the folder sd and use the direct link to the colab, that error should not show anymore

Dreason8 commented 1 year ago

Seems to be working for me now, thanks for the effort mate @TheLastBen