d8ahazard / sd_dreambooth_extension

Other
1.85k stars 281 forks source link

[Bug]: #1374

Closed naneliolips closed 8 months ago

naneliolips commented 9 months ago

Is there an existing issue for this?

What happened?

i have issue after the installation in sd.webui and i couldn't figure this issue

Steps to reproduce the problem

extensions>dreambooth>install>relaunch

Commit and libraries

Ekran görüntüsü 2023-10-20 230417

Command Line Arguments

Use --skip-version-check commandline argument to disable this check.
==============================================================================
Exception importing api
Traceback (most recent call last):
  File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\scripts\api.py", line 27, in <module>
    from dreambooth.dataclasses.db_config import from_file, DreamboothConfig
  File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\dreambooth\dataclasses\db_config.py", line 14, in <module>
    from dreambooth.utils.image_utils import get_scheduler_names  # noqa
  File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\dreambooth\utils\image_utils.py", line 11, in <module>
    from diffusers.schedulers import KarrasDiffusionSchedulers
ModuleNotFoundError: No module named 'diffusers'
*** Error loading script: main.py
    Traceback (most recent call last):
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\modules\scripts.py", line 382, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\scripts\main.py", line 8, in <module>
        from dreambooth.dataclasses.db_config import from_file, save_config
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\dreambooth\dataclasses\db_config.py", line 14, in <module>
        from dreambooth.utils.image_utils import get_scheduler_names  # noqa
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\dreambooth\utils\image_utils.py", line 11, in <module>
        from diffusers.schedulers import KarrasDiffusionSchedulers
    ModuleNotFoundError: No module named 'diffusers'

Console logs

You are running torch 1.13.1+cu117.
The program is tested to work with torch 2.0.0.
To reinstall the desired version, run with commandline flag --reinstall-torch.
Beware that this will cause a lot of large files to be downloaded, as well as
there are reports of issues with training tab on the latest version.

Use --skip-version-check commandline argument to disable this check.
==============================================================================
Exception importing api
Traceback (most recent call last):
  File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\scripts\api.py", line 27, in <module>
    from dreambooth.dataclasses.db_config import from_file, DreamboothConfig
  File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\dreambooth\dataclasses\db_config.py", line 14, in <module>
    from dreambooth.utils.image_utils import get_scheduler_names  # noqa
  File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\dreambooth\utils\image_utils.py", line 11, in <module>
    from diffusers.schedulers import KarrasDiffusionSchedulers
ModuleNotFoundError: No module named 'diffusers'
*** Error loading script: main.py
    Traceback (most recent call last):
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\modules\scripts.py", line 382, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\modules\script_loading.py", line 10, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\scripts\main.py", line 8, in <module>
        from dreambooth.dataclasses.db_config import from_file, save_config
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\dreambooth\dataclasses\db_config.py", line 14, in <module>
        from dreambooth.utils.image_utils import get_scheduler_names  # noqa
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\dreambooth\utils\image_utils.py", line 11, in <module>
        from diffusers.schedulers import KarrasDiffusionSchedulers
    ModuleNotFoundError: No module named 'diffusers'

---
Loading weights [6ce0161689] from C:\Users\Batuhann\Downloads\sd.webui\webui\models\Stable-diffusion\v1-5-pruned-emaonly.safetensors
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
*** Error executing callback app_started_callback for C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\scripts\api.py
    Traceback (most recent call last):
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\modules\script_callbacks.py", line 139, in app_started_callback
        c.callback(demo, app)
      File "C:\Users\Batuhann\Downloads\sd.webui\webui\extensions\sd_dreambooth_extension\scripts\api.py", line 534, in dreambooth_api
        model_cfg: DreamboothConfig = Body(description="The config to save"),
    NameError: name 'DreamboothConfig' is not defined

---
Startup time: 15.6s (prepare environment: 13.3s, other imports: 0.5s, load scripts: 0.9s, create ui: 0.3s, gradio launch: 0.3s).
Creating model from config: C:\Users\Batuhann\Downloads\sd.webui\webui\configs\v1-inference.yaml
Applying attention optimization: Doggettx... done.

Additional information

No response

madrooky commented 9 months ago

You are missing the diffusors module. Check the requirements txt file if it is in the list. Then start a console from SD main folder and execute "git pull". See if diffusors get installed. One workaround might be also to check the requirements text file in the dreambooth extension folder and compare it to the SD requirements, add the dreambooth requirements to the SD if necessary. But normally it should work without such a hussle.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days