AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: SD3 model is not loading #16343

Open Fifanich opened 1 month ago

Fifanich commented 1 month ago

Checklist

What happened?

After the 1.10.1 update was released, I installed it, downloaded the SD3 models (sd3_medium , stableDiffusion3SD3_sd3MediumInclT5XXL ) and the CLIP models (clip_g, clip_l, t5xxl_fp8_e4m3fn), placed them in the specified folders stable-diffusion-webui\webui\models\Stable-diffusion\SD3, stable-diffusion-webui\webui\models\CLIP . The interface starts up normally. When I try to load an SD3 model, the terminal displays an error and the interface switches to the last model. I installed a completely clean build Automatik 1111, without extensions, in it the same error occurs. Tried all the advice on the internet, nothing helped. Reinstalled Python. The error indicates the absence of a repository weighing 100 gb, which according to the instructions should not be downloaded, because the model T5 is in the folder CLIP. In Comfy, the SD3 models are running and the files are not corrupted.

Steps to reproduce the problem

  1. start Automatik 1111
  2. in the checkpoint window select model SD3

What should have happened?

the SD3 model should be loaded and used for image generation

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

sysinfo-2024-08-07-17-28.json

Console logs

remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 3), reused 5 (delta 2), pack-reused 0
Unpacking objects: 100% (8/8), 4.52 KiB | 57.00 KiB/s, done.
From https://github.com/AUTOMATIC1111/stable-diffusion-webui
 * [new branch]        add-Usage-Syntax-to-Prompts-from-file-or-textbox -> origin/add-Usage-Syntax-to-Prompts-from-file-or-textbox
Already up to date.
venv "C:\stable-diffusion-webui\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)]
Version: v1.10.1
Commit hash: 82a973c04367123ae98bd9abdf80d9eda9b910e2
Faceswaplab : Use GPU requirements
Checking faceswaplab requirements
Install protobuf>=3.20.2
Installing sd-webui-faceswaplab requirement: protobuf>=3.20.2
3.0712601999985054
CUDA 12.1
Launching Web UI with arguments: --api --opt-sdp-attention --xformers --disable-safe-unpickle
[-] ADetailer: Failed to load model 'person_yolov8n-seg.pt' from huggingface
[-] ADetailer: Failed to load model 'face_yolov8n.pt' from huggingface
[-] ADetailer: Failed to load model 'face_yolov8s.pt' from huggingface
[-] ADetailer: Failed to load model 'yolov8x-worldv2.pt' from huggingface
[-] ADetailer initialized. version: 24.8.0, num models: 6
ControlNet preprocessor location: C:\stable-diffusion-webui\webui\extensions\sd-webui-controlnet\annotator\downloads
2024-08-07 20:05:38,318 - ControlNet - INFO - ControlNet v1.1.455
Please 'pip install apex'
sd-webui-prompt-all-in-one background API service started successfully.
20:05:40 - ReActor - STATUS - Running v0.7.1-a1 on Device: CUDA
Loading weights [2d122c9cb2] from C:\stable-diffusion-webui\webui\models\Stable-diffusion\XL\halcyonSDXL_v17.safetensors2024-08-07 20:05:41,794 - ControlNet - INFO - ControlNet UI callback registered.
Creating model from config: C:\stable-diffusion-webui\webui\repositories\generative-models\configs\inference\sd_xl_base.yaml
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 60.6s (prepare environment: 31.2s, import torch: 4.7s, import gradio: 1.3s, setup paths: 0.9s, initialize shared: 0.3s, other imports: 0.7s, list SD models: 0.2s, load scripts: 9.6s, create ui: 6.3s, gradio launch: 2.5s, add APIs: 1.1s, app_started_callback: 1.7s).
Applying attention optimization: xformers... done.
Model loaded in 12.7s (load weights from disk: 1.1s, create model: 0.9s, apply weights to model: 7.5s, apply half(): 2.2s, move model to device: 0.3s, calculate empty prompt: 0.4s).
100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:04<00:00,  4.73it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████| 20/20 [00:03<00:00,  5.23it/s]
Reusing loaded model XL\halcyonSDXL_v17.safetensors [2d122c9cb2] to load SD3\sd3_medium.safetensors [cc236278d2]71it/s]
Loading weights [cc236278d2] from C:\stable-diffusion-webui\webui\models\Stable-diffusion\SD3\sd3_medium.safetensors
Creating model from config: C:\stable-diffusion-webui\webui\configs\sd3-inference.yaml
creating model quickly: FileNotFoundError
Traceback (most recent call last):
  File "C:\Users\telno\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "C:\Users\telno\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\stable-diffusion-webui\webui\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "C:\stable-diffusion-webui\webui\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "C:\stable-diffusion-webui\webui\modules\ui_settings.py", line 316, in <lambda>
    fn=lambda value, k=k: self.run_settings_single(value, key=k),
  File "C:\stable-diffusion-webui\webui\modules\ui_settings.py", line 95, in run_settings_single
    if value is None or not opts.set(key, value):
  File "C:\stable-diffusion-webui\webui\modules\options.py", line 165, in set
    option.onchange()
  File "C:\stable-diffusion-webui\webui\modules\call_queue.py", line 14, in f
    res = func(*args, **kwargs)
  File "C:\stable-diffusion-webui\webui\modules\initialize_util.py", line 181, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: sd_models.reload_model_weights()), call=False)
  File "C:\stable-diffusion-webui\webui\modules\sd_models.py", line 977, in reload_model_weights
    load_model(checkpoint_info, already_loaded_state_dict=state_dict)
  File "C:\stable-diffusion-webui\webui\modules\sd_models.py", line 820, in load_model
    sd_model = instantiate_from_config(sd_config.model, state_dict)
  File "C:\stable-diffusion-webui\webui\modules\sd_models.py", line 775, in instantiate_from_config
    return constructor(**params)
  File "C:\stable-diffusion-webui\webui\modules\models\sd3\sd3_model.py", line 34, in __init__
    self.text_encoders = SD3Cond()
  File "C:\stable-diffusion-webui\webui\modules\models\sd3\sd3_cond.py", line 164, in __init__
    self.tokenizer = SD3Tokenizer()
  File "C:\stable-diffusion-webui\webui\modules\models\sd3\other_impls.py", line 221, in __init__
    self.t5xxl = T5XXLTokenizer()
  File "C:\stable-diffusion-webui\webui\modules\models\sd3\other_impls.py", line 317, in __init__
    super().__init__(pad_with_end=False, tokenizer=T5TokenizerFast.from_pretrained("google/t5-v1_1-xxl"), has_start_token=False, pad_to_max_length=False, max_length=99999999, min_length=77)
  File "C:\stable-diffusion-webui\webui\venv\lib\site-packages\transformers\tokenization_utils_base.py", line 1766, in from_pretrained
    with open(resolved_config_file, encoding="utf-8") as reader:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\telno/.cache\\huggingface\\hub\\models--google--t5-v1_1-xxl\\snapshots\\3db67ab1af984cf10548a73467f0e5bca2aaaeb2\\tokenizer_config.json'

Failed to create model quickly; will retry using slow method.
changing setting sd_model_checkpoint to SD3\sd3_medium.safetensors [cc236278d2]: FileNotFoundError
Traceback (most recent call last):
  File "C:\stable-diffusion-webui\webui\modules\options.py", line 165, in set
    option.onchange()
  File "C:\stable-diffusion-webui\webui\modules\call_queue.py", line 14, in f
    res = func(*args, **kwargs)
  File "C:\stable-diffusion-webui\webui\modules\initialize_util.py", line 181, in <lambda>
    shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: sd_models.reload_model_weights()), call=False)
  File "C:\stable-diffusion-webui\webui\modules\sd_models.py", line 977, in reload_model_weights
    load_model(checkpoint_info, already_loaded_state_dict=state_dict)
  File "C:\stable-diffusion-webui\webui\modules\sd_models.py", line 829, in load_model
    sd_model = instantiate_from_config(sd_config.model, state_dict)
  File "C:\stable-diffusion-webui\webui\modules\sd_models.py", line 775, in instantiate_from_config
    return constructor(**params)
  File "C:\stable-diffusion-webui\webui\modules\models\sd3\sd3_model.py", line 34, in __init__
    self.text_encoders = SD3Cond()
  File "C:\stable-diffusion-webui\webui\modules\models\sd3\sd3_cond.py", line 164, in __init__
    self.tokenizer = SD3Tokenizer()
  File "C:\stable-diffusion-webui\webui\modules\models\sd3\other_impls.py", line 221, in __init__
    self.t5xxl = T5XXLTokenizer()
  File "C:\stable-diffusion-webui\webui\modules\models\sd3\other_impls.py", line 317, in __init__
    super().__init__(pad_with_end=False, tokenizer=T5TokenizerFast.from_pretrained("google/t5-v1_1-xxl"), has_start_token=False, pad_to_max_length=False, max_length=99999999, min_length=77)
  File "C:\stable-diffusion-webui\webui\venv\lib\site-packages\transformers\tokenization_utils_base.py", line 1766, in from_pretrained
    with open(resolved_config_file, encoding="utf-8") as reader:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\telno/.cache\\huggingface\\hub\\models--google--t5-v1_1-xxl\\snapshots\\3db67ab1af984cf10548a73467f0e5bca2aaaeb2\\tokenizer_config.json'

Additional information

XL and 1.5 checkpoints work fine, all extensions work without fail. driver has not been updated recently.

trsh3r commented 3 weeks ago

same problem here, did you manage to resolve?

Flash169-designer commented 2 weeks ago

same problem

Fifanich commented 2 weeks ago

здесь та же проблема, вам удалось решить?

no