AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
142.49k stars 26.87k forks source link

[Bug]: webui-user.bat #9980

Closed Chompy0067 closed 1 year ago

Chompy0067 commented 1 year ago

Is there an existing issue for this?

What happened?

Hello everyone, I used Stable diffusion this morning and it was working perfectly. A few minutes later, I got stuck when launching webui-user.bat with the following information. As I'm not an expert, something may have escaped me. Thank you.

Steps to reproduce the problem

  1. Go to webui-user.bat
  2. Doesnt lauch

What should have happened?

Should have given me the IP

Commit where the problem happens

webui-user.bat

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

no

List of extensions

stable-diffusion-webui-depthmap-script

Console logs

`Already up to date.
venv "C:\Users\phili\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 72cd27a13587c9579942577e9e3880778be195f6
Installing requirements
Installing imageio-ffmpeg requirement for depthmap script
Installing pyqt5 requirement for depthmap script

Launching Web UI with arguments:
No module 'xformers'. Proceeding without it.
==============================================================================
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.
==============================================================================
Error loading script: change_naming_configs_and_checkpoints.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\change_naming_configs_and_checkpoints.py", line 24, in <module>
    from diffusers import UNet2DConditionModel, UNet2DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: conversion_ldm_uncond.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\conversion_ldm_uncond.py", line 3, in <module>
    import OmegaConf
ModuleNotFoundError: No module named 'OmegaConf'

Error loading script: convert_dance_diffusion_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_dance_diffusion_to_diffusers.py", line 8, in <module>
    from audio_diffusion.models import DiffusionAttnUnet1D
ModuleNotFoundError: No module named 'audio_diffusion'

Error loading script: convert_ddpm_original_checkpoint_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_ddpm_original_checkpoint_to_diffusers.py", line 6, in <module>
    from diffusers import AutoencoderKL, DDPMPipeline, DDPMScheduler, UNet2DModel, VQModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_dit_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_dit_to_diffusers.py", line 7, in <module>
    from diffusers import AutoencoderKL, DDIMScheduler, DiTPipeline, Transformer2DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_k_upscaler_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_k_upscaler_to_diffusers.py", line 7, in <module>
    from diffusers import UNet2DConditionModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_kakao_brain_unclip_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_kakao_brain_unclip_to_diffusers.py", line 8, in <module>
    from diffusers import UnCLIPPipeline, UNet2DConditionModel, UNet2DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_ldm_original_checkpoint_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_ldm_original_checkpoint_to_diffusers.py", line 22, in <module>
    from diffusers import DDPMScheduler, LDMPipeline, UNet2DModel, VQModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_lora_safetensor_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_lora_safetensor_to_diffusers.py", line 23, in <module>
    from diffusers import StableDiffusionPipeline
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_models_diffuser_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_models_diffuser_to_diffusers.py", line 6, in <module>
    from diffusers import UNet1DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_ms_text_to_video_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_ms_text_to_video_to_diffusers.py", line 21, in <module>
    from diffusers import UNet3DConditionModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_music_spectrogram_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_music_spectrogram_to_diffusers.py", line 5, in <module>
    import jax as jnp
ModuleNotFoundError: No module named 'jax'

Error loading script: convert_ncsnpp_original_checkpoint_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_ncsnpp_original_checkpoint_to_diffusers.py", line 22, in <module>
    from diffusers import ScoreSdeVePipeline, ScoreSdeVeScheduler, UNet2DModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_original_audioldm_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_original_audioldm_to_diffusers.py", line 21, in <module>
    from transformers import (
ImportError: cannot import name 'ClapTextConfig' from 'transformers' (C:\Users\phili\stable-diffusion-webui\venv\lib\site-packages\transformers\__init__.py)

Error loading script: convert_original_controlnet_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_original_controlnet_to_diffusers.py", line 19, in <module>
    from diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_controlnet_from_original_ckpt
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_original_stable_diffusion_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_original_stable_diffusion_to_diffusers.py", line 19, in <module>
    from diffusers.pipelines.stable_diffusion.convert_from_ckpt import download_from_original_stable_diffusion_ckpt
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_stable_diffusion_checkpoint_to_onnx.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_stable_diffusion_checkpoint_to_onnx.py", line 20, in <module>
    import onnx
ModuleNotFoundError: No module named 'onnx'

Error loading script: convert_unclip_txt2img_to_image_variation.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_unclip_txt2img_to_image_variation.py", line 5, in <module>
    from diffusers import UnCLIPImageVariationPipeline, UnCLIPPipeline
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_vae_diff_to_onnx.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_vae_diff_to_onnx.py", line 22, in <module>
    from diffusers import AutoencoderKL
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_vae_pt_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_vae_pt_to_diffusers.py", line 8, in <module>
    from diffusers import AutoencoderKL
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_versatile_diffusion_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_versatile_diffusion_to_diffusers.py", line 28, in <module>
    from diffusers import (
ModuleNotFoundError: No module named 'diffusers'

Error loading script: convert_vq_diffusion_to_diffusers.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\convert_vq_diffusion_to_diffusers.py", line 44, in <module>
    from diffusers import Transformer2DModel, VQDiffusionPipeline, VQDiffusionScheduler, VQModel
ModuleNotFoundError: No module named 'diffusers'

Error loading script: generate_logits.py
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\phili\stable-diffusion-webui\modules\script_loading.py", line 11, 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\phili\stable-diffusion-webui\extensions\diffusers\scripts\generate_logits.py", line 6, in <module>
    from diffusers import UNet2DModel
ModuleNotFoundError: No module named 'diffusers'

Loading weights [c6bbc15e32] from C:\Users\phili\stable-diffusion-webui\models\Stable-diffusion\sd-v1-5-inpainting.ckpt
Error verifying pickled file from C:\Users\phili\stable-diffusion-webui\models\Stable-diffusion\sd-v1-5-inpainting.ckpt:
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\modules\safe.py", line 132, in load_with_extra
    check_pt(filename, extra_handler)
  File "C:\Users\phili\stable-diffusion-webui\modules\safe.py", line 90, in check_pt
    unpickler.load()
  File "C:\Users\phili\stable-diffusion-webui\modules\safe.py", line 27, in persistent_load
    return TypedStorage(_internal=True)
TypeError: TypedStorage.__new__() got an unexpected keyword argument '_internal'

The file may be malicious, so the program is not going to read it.
You can skip this check with --disable-safe-unpickle commandline argument.

loading stable diffusion model: AttributeError
Traceback (most recent call last):
  File "C:\Users\phili\stable-diffusion-webui\webui.py", line 195, in initialize
    modules.sd_models.load_model()
  File "C:\Users\phili\stable-diffusion-webui\modules\sd_models.py", line 424, in load_model
    state_dict = get_checkpoint_state_dict(checkpoint_info, timer)
  File "C:\Users\phili\stable-diffusion-webui\modules\sd_models.py", line 271, in get_checkpoint_state_dict
    res = read_state_dict(checkpoint_info.filename)
  File "C:\Users\phili\stable-diffusion-webui\modules\sd_models.py", line 257, in read_state_dict
    sd = get_state_dict_from_checkpoint(pl_sd)
  File "C:\Users\phili\stable-diffusion-webui\modules\sd_models.py", line 206, in get_state_dict_from_checkpoint
    pl_sd = pl_sd.pop("state_dict", pl_sd)
AttributeError: 'NoneType' object has no attribute 'pop'

Stable diffusion model failed to load, exiting
Appuyez sur une touche pour continuer...`

Additional information

No response

jameslanman commented 1 year ago

Seconding, exact same issue. Can't even launch Automatic.

zdrummon commented 1 year ago

Same issue, the new update as of today causes this fatal error and i can no longer open automatic1111 at all

salvdev commented 1 year ago

Same issue. Checked out a9eab236d7e8afa4d6205127904a385b2c43bb24 for the time being.

zdrummon commented 1 year ago

I managed to fix it on my end.

  1. right click webui-user.bat -> open in text editor
  2. edit the line that says "set COMMANDLINE_ARGS=" and change it to "set COMMANDLINE_ARGS= --reinstall-torch"
  3. save
  4. (optional) You may need to remove the change after the fix, i do not know if it will continue to try to reinstall every time afterwards (I did not check)

This resolved the issue for me (so far)

evanjs commented 1 year ago

Yes, the new changes require torch 2.0 as mentioned near the top of the error message

==============================================================================
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.
==============================================================================

You need to reinstall either using the above method or similar to ensure that torch is updated.

Admittedly, I struggled with this issue when upgrading at first as the initial error message does not fail the program and is soon buried under dozes of other errors.

It might be nice to either fail fast here, update torch automatically, or somehow make what is happening more obvious to the end user 🤷‍♂️

akx commented 1 year ago

For some reason, you have the Hugging Face diffusers library in your extensions directory. Remove it from there and try again.