vladmandic / automatic

SD.Next: Advanced Implementation of Stable Diffusion and other Diffusion-based generative image models
https://github.com/vladmandic/automatic
GNU Affero General Public License v3.0
5.51k stars 402 forks source link

[Issue]: Würstchen safetensor fails to load #2910

Closed gptlang closed 6 months ago

gptlang commented 6 months ago

Issue Description

───────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────╮
│ /automatic/modules/sd_models.py:944 in load_diffuser                                                         │
│                                                                                                              │
│    943 │   │   │   │   │   │   sd_hijack_accelerate.restore_accelerate()                                     │
│ ❱  944 │   │   │   │   │   sd_model = pipeline.from_single_file(checkpoint_info.path, **diffusers_load_confi │
│    945 │   │   │   │   │   if sd_model is not None and hasattr(sd_model, 'unet') and hasattr(sd_model.unet,  │
│                                                                                                              │
│ /automatic/venv/lib64/python3.11/site-packages/huggingface_hub/utils/_validators.py:118 in _inner_fn         │
│                                                                                                              │
│   117 │   │                                                                                                  │
│ ❱ 118 │   │   return fn(*args, **kwargs)                                                                     │
│   119                                                                                                        │
│                                                                                                              │
│ /automatic/venv/lib64/python3.11/site-packages/diffusers/loaders/single_file.py:253 in from_single_file      │
│                                                                                                              │
│   252 │   │   │   else:                                                                                      │
│ ❱ 253 │   │   │   │   components = build_sub_model_components(                                               │
│   254 │   │   │   │   │   init_kwargs,                                                                       │
│                                                                                                              │
│ /automatic/venv/lib64/python3.11/site-packages/diffusers/loaders/single_file.py:58 in build_sub_model_compon │
│                                                                                                              │
│    57 │   │   num_in_channels = kwargs.pop("num_in_channels", None)                                          │
│ ❱  58 │   │   unet_components = create_diffusers_unet_model_from_ldm(                                        │
│    59 │   │   │   pipeline_class_name, original_config, checkpoint, num_in_channels=num_in_channels, image_s │
│                                                                                                              │
│ /automatic/venv/lib64/python3.11/site-packages/diffusers/loaders/single_file_utils.py:1166 in create_diffuse │
│                                                                                                              │
│   1165 │                                                                                                     │
│ ❱ 1166 │   diffusers_format_unet_checkpoint = convert_ldm_unet_checkpoint(checkpoint, unet_config, extract_e │
│   1167 │   ctx = init_empty_weights if is_accelerate_available() else nullcontext                            │
│                                                                                                              │
│ /automatic/venv/lib64/python3.11/site-packages/diffusers/loaders/single_file_utils.py:673 in convert_ldm_une │
│                                                                                                              │
│    672 │   # Mid blocks                                                                                      │
│ ❱  673 │   resnet_0 = middle_blocks[0]                                                                       │
│    674 │   attentions = middle_blocks[1]                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
KeyError: 0

Version Platform Description

Commit: c1dfb1b28e37f286107b44740ccf6d1733233992

Fedora 39: Python3.11

Backend

Original

Branch

Master

Model

Other

Acknowledgements

vladmandic commented 6 months ago

do not just dump error, spend 1min to describe the issue and post log leading to error. not to mention that readme is very clear that backend:original supports only sd15.

vladmandic commented 6 months ago

closing as invalid, can be reopened if information is provided.