fast-stable-diffusion
fast-stable-diffusion copied to clipboard
Issue running Dreambooth
I am getting the following error when starting up SD after enabling the Dreambooth extension. Updated the repo to the latest and started from a clean install earlier today:
Error loading script: api.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 184, in load_scripts module = script_loading.load_module(scriptfile.path) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module compiled = compile(text, path, 'exec') File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/api.py", line 14 db_half_model: bool = False, ^ SyntaxError: invalid syntax
Error loading script: main.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 184, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
exec(compiled, module.dict)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/main.py", line 3, in
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/dreambooth.py", line 13, in
do this in a new cell :
!pip install -U diffusers
Ok so I tried the fix and was still getting the SyntaxError.
(second run)
I check out the file and my python isn't good, the first two lines were different to the rest so I updated it match which fixed that issue ie:
class DreamboothParameters(BaseModel):
db_half_model: bool = False,
db_use_concepts: bool = False,
db_pretrained_model_name_or_path: str
changed to
class DreamboothParameters(BaseModel):
db_half_model: bool = False
db_use_concepts: bool = False
db_pretrained_model_name_or_path: str
I check the original repo and that issue is there and has been for some time as far as I can tell. Is that code valid python? I couldn't get it to run with the commas.
Anyway getting past that issue I still have the EulerAncestralDiscreteScheduler
issue:
Error loading script: api.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 184, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
exec(compiled, module.__dict__)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/api.py", line 9, in <module>
from extensions.sd_dreambooth_extension.dreambooth import conversion, dreambooth
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/conversion.py", line 28, in <module>
from extensions.sd_dreambooth_extension.dreambooth.dreambooth import get_db_models, printm, reload_system_models, \
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/dreambooth.py", line 13, in <module>
from diffusers import StableDiffusionPipeline, EulerAncestralDiscreteScheduler
ImportError: cannot import name 'EulerAncestralDiscreteScheduler' from 'diffusers' (/usr/local/lib/python3.7/dist-packages/diffusers/__init__.py)
Error loading script: main.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 184, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
exec(compiled, module.__dict__)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/main.py", line 3, in <module>
from extensions.sd_dreambooth_extension.dreambooth import conversion, dreambooth
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/conversion.py", line 28, in <module>
from extensions.sd_dreambooth_extension.dreambooth.dreambooth import get_db_models, printm, reload_system_models, \
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/dreambooth.py", line 13, in <module>
from diffusers import StableDiffusionPipeline, EulerAncestralDiscreteScheduler
ImportError: cannot import name 'EulerAncestralDiscreteScheduler' from 'diffusers' (/usr/local/lib/python3.7/dist-packages/diffusers/__init__.py)
Did a quick search online to see if this was common and the only thing I found was related to Huggingface and the solution was basically the same as the one you provided, which doesn't work. So seems there's another package we're missing?
Any ideas would be appreciated.
Thanks.
Still getting this error too, tried installing dreambooth on my pc and have this same error as google collab.
Error loading script: main.py
Traceback (most recent call last):
File "M:\stable-diffusion-webui\modules\scripts.py", line 170, in load_scripts
exec(compiled, module.dict)
File "M:\stable-diffusion-webui\extensions\sd_dreambooth_extension\scripts\main.py", line 3, in
File "M:\stable-diffusion-webui\extensions\sd_dreambooth_extension\dreambooth\dreambooth.py", line 13, in
Hi
Thanks for the work you have done.
I have the same problem with dreambooth extension. I managed to install it, but it fails to launch. I ran "!pip install -U diffusers" in a new cell, but the problem still remain :
Error loading script: api.py (...) ImportError: cannot import name 'CLIPVisionModelWithProjection' from 'transformers' (/usr/local/lib/python3.8/dist-packages/transformers/init.py) + Error loading script: dreambooth.py (...) ImportError: cannot import name 'CLIPVisionModelWithProjection' from 'transformers' (/usr/local/lib/python3.8/dist-packages/transformers/init.py) + Error loading script: main.py (...) ImportError: cannot import name 'CLIPVisionModelWithProjection' from 'transformers' (/usr/local/lib/python3.8/dist-packages/transformers/init.py)
I really like to use dreamboth not locally with automatic 1111. I will really appreciate some help !
full error :
Error loading script: api.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 205, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
exec(compiled, module.dict)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/api.py", line 23, in
Error loading script: dreambooth.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 205, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
exec(compiled, module.dict)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/dreambooth.py", line 16, in
Error loading script: main.py
Traceback (most recent call last):
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 205, in load_scripts
module = script_loading.load_module(scriptfile.path)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 13, in load_module
exec(compiled, module.dict)
File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions/sd_dreambooth_extension/scripts/main.py", line 9, in