lllyasviel / lllyasviel/stable-diffusion-webui-forge

Failed to recognize model type!

Open
#3,094 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Loading Model: {'checkpoint_info': {'filename': 'C:\\Users\\Stepan\\Downloads\\webui_forge_cu121_torch231\\webui\\models\\Stable-diffusion\\TinyBunnyPolinaILXL_V1.safetensors', 'hash': '47f0387c'}, 'additional_modules': [], 'unet_storage_dtype': None}
Traceback (most recent call last):
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\backend\loader.py", line 500, in forge_loader
state_dicts, estimated_config = split_state_dict(sd, additional_state_dicts=additional_state_dicts)
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\backend\loader.py", line 452, in split_state_dict
guess = huggingface_guess.guess(sd)
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\repositories\huggingface_guess\huggingface_guess\__init__.py", line 7, in guess
result.unet_key_prefix = [unet_key_prefix]
AttributeError: 'NoneType' object has no attribute 'unet_key_prefix'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\modules_forge\main_thread.py", line 30, in work
self.result = self.func(*self.args, **self.kwargs)
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\modules\txt2img.py", line 131, in txt2img_function
processed = processing.process_images(p)
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\modules\processing.py", line 836, in process_images
manage_model_and_prompt_cache(p)
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\modules\processing.py", line 804, in manage_model_and_prompt_cache
p.sd_model, just_reloaded = forge_model_reload()
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\modules\sd_models.py", line 504, in forge_model_reload
sd_model = forge_loader(state_dict, additional_state_dicts=additional_state_dicts)
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\Users\Stepan\Downloads\webui_forge_cu121_torch231\webui\backend\loader.py", line 502, in forge_loader
raise ValueError('Failed to recognize model type!')
ValueError: Failed to recognize model type!
Failed to recognize model type!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with backend/loader.py around split_state_dict and forge_loader, then inspect repositories/huggingface_guess/huggingface_guess/__init__.py where guess returns None before unet_key_prefix is accessed. Reproduce loading TinyBunnyPolinaILXL_V1.safetensors and trace why its state dictionary is not recognized. Done means the model-loading failure is resolved or reported with a clear diagnostic for this model type.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.