lllyasviel / lllyasviel/stable-diffusion-webui-forge
KeyError: 'gelu_new' 'gelu_new'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
ControlNet preprocessor location: G:\webui_forge_cu121_torch231\webui\models\ControlNetPreprocessor
2024-08-16 16:49:29,387 - ControlNet - INFO - ControlNet UI callback registered.
Model selected: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium_incl_clips_t5xxlfp8.safetensors', 'hash': '3b2e42cf'}, 'additional_modules': [], 'unet_storage_dtype': torch.float8_e4m3fn}
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Startup time: 21.5s (prepare environment: 6.0s, launcher: 1.8s, import torch: 4.5s, initialize shared: 0.7s, other imports: 0.9s, list SD models: 0.2s, load scripts: 1.8s, create ui: 2.4s, gradio launch: 1.0s, add APIs: 2.2s).
Environment vars changed: {'stream': False, 'inference_memory': 1024.0, 'pin_shared_memory': False}
Model selected: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium_incl_clips_t5xxlfp8.safetensors', 'hash': '3b2e42cf'}, 'additional_modules': [], 'unet_storage_dtype': None}
Model selected: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium_incl_clips_t5xxlfp8.safetensors', 'hash': '3b2e42cf'}, 'additional_modules': [], 'unet_storage_dtype': torch.float8_e4m3fn}
Model selected: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium.safetensors', 'hash': '9b88d133'}, 'additional_modules': [], 'unet_storage_dtype': torch.float8_e4m3fn}
Model selected: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium_incl_clips.safetensors', 'hash': '080136ef'}, 'additional_modules': [], 'unet_storage_dtype': torch.float8_e4m3fn}
Model selected: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium_incl_clips.safetensors', 'hash': '080136ef'}, 'additional_modules': ['G:\\ComfyUI\\models\\vae\\t5xxl_fp8_e4m3fn.safetensors'], 'unet_storage_dtype': torch.float8_e4m3fn}
Model selected: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium_incl_clips.safetensors', 'hash': '080136ef'}, 'additional_modules': ['G:\\ComfyUI\\models\\vae\\t5xxl_fp8_e4m3fn.safetensors'], 'unet_storage_dtype': torch.float8_e4m3fn}
Loading Model: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium_incl_clips.safetensors', 'hash': '080136ef'}, 'additional_modules': ['G:\\ComfyUI\\models\\vae\\t5xxl_fp8_e4m3fn.safetensors'], 'unet_storage_dtype': torch.float8_e4m3fn}
StateDict Keys: {'unet': 491, 'vae': 244, 'text_encoder': 196, 'text_encoder_2': 517, 'text_encoder_3': 220, 'ignore': 0}
Using Detected T5 Data Type: torch.float8_e4m3fn
Traceback (most recent call last):
File "G:\webui_forge_cu121_torch231\webui\modules_forge\main_thread.py", line 30, in work
self.result = self.func(*self.args, **self.kwargs)
File "G:\webui_forge_cu121_torch231\webui\modules\txt2img.py", line 110, in txt2img_function
processed = processing.process_images(p)
File "G:\webui_forge_cu121_torch231\webui\modules\processing.py", line 789, in process_images
p.sd_model, just_reloaded = forge_model_reload()
File "C:\Program Files\Python310\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "G:\webui_forge_cu121_torch231\webui\modules\sd_models.py", line 501, in forge_model_reload
sd_model = forge_loader(state_dict, additional_state_dicts=additional_state_dicts)
File "C:\Program Files\Python310\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "G:\webui_forge_cu121_torch231\webui\backend\loader.py", line 261, in forge_loader
component = load_huggingface_component(estimated_config, component_name, lib_name, cls_name, local_path, component_sd)
File "G:\webui_forge_cu121_torch231\webui\backend\loader.py", line 94, in load_huggingface_component
model = IntegratedT5(config)
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 211, in __init__
self.transformer = T5(config)
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 199, in __init__
self.encoder = T5Stack(self.num_layers, model_dim, model_dim, config["d_ff"], config["dense_act_fn"], config["is_gated_act"], config["num_heads"], config["model_type"] != "umt5")
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 172, in __init__
[T5Block(model_dim, inner_dim, ff_dim, ff_activation, gated_act, num_heads, relative_attention_bias=((not relative_attention) or (i == 0))) for i in range(num_layers)]
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 172, in
[T5Block(model_dim, inner_dim, ff_dim, ff_activation, gated_act, num_heads, relative_attention_bias=((not relative_attention) or (i == 0))) for i in range(num_layers)]
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 159, in __init__
self.layer.append(T5LayerFF(model_dim, ff_dim, ff_activation, gated_act))
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 58, in __init__
self.DenseReluDense = T5DenseGatedActDense(model_dim, ff_dim, ff_activation)
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 44, in __init__
self.act = activations[ff_activation]
KeyError: 'gelu_new'
'gelu_new'
Loading Model: {'checkpoint_info': {'filename': 'G:\\ComfyUI\\models\\checkpoints\\SD3\\sd3_medium_incl_clips.safetensors', 'hash': '080136ef'}, 'additional_modules': ['G:\\ComfyUI\\models\\vae\\t5xxl_fp8_e4m3fn.safetensors'], 'unet_storage_dtype': torch.float8_e4m3fn}
StateDict Keys: {'unet': 491, 'vae': 244, 'text_encoder': 196, 'text_encoder_2': 517, 'text_encoder_3': 220, 'ignore': 0}
Using Detected T5 Data Type: torch.float8_e4m3fn
Traceback (most recent call last):
File "G:\webui_forge_cu121_torch231\webui\modules_forge\main_thread.py", line 30, in work
self.result = self.func(*self.args, **self.kwargs)
File "G:\webui_forge_cu121_torch231\webui\modules\txt2img.py", line 110, in txt2img_function
processed = processing.process_images(p)
File "G:\webui_forge_cu121_torch231\webui\modules\processing.py", line 789, in process_images
p.sd_model, just_reloaded = forge_model_reload()
File "C:\Program Files\Python310\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "G:\webui_forge_cu121_torch231\webui\modules\sd_models.py", line 501, in forge_model_reload
sd_model = forge_loader(state_dict, additional_state_dicts=additional_state_dicts)
File "C:\Program Files\Python310\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "G:\webui_forge_cu121_torch231\webui\backend\loader.py", line 261, in forge_loader
component = load_huggingface_component(estimated_config, component_name, lib_name, cls_name, local_path, component_sd)
File "G:\webui_forge_cu121_torch231\webui\backend\loader.py", line 94, in load_huggingface_component
model = IntegratedT5(config)
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 211, in __init__
self.transformer = T5(config)
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 199, in __init__
self.encoder = T5Stack(self.num_layers, model_dim, model_dim, config["d_ff"], config["dense_act_fn"], config["is_gated_act"], config["num_heads"], config["model_type"] != "umt5")
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 172, in __init__
[T5Block(model_dim, inner_dim, ff_dim, ff_activation, gated_act, num_heads, relative_attention_bias=((not relative_attention) or (i == 0))) for i in range(num_layers)]
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 172, in
[T5Block(model_dim, inner_dim, ff_dim, ff_activation, gated_act, num_heads, relative_attention_bias=((not relative_attention) or (i == 0))) for i in range(num_layers)]
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 159, in __init__
self.layer.append(T5LayerFF(model_dim, ff_dim, ff_activation, gated_act))
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 58, in __init__
self.DenseReluDense = T5DenseGatedActDense(model_dim, ff_dim, ff_activation)
File "G:\webui_forge_cu121_torch231\webui\backend\nn\t5.py", line 44, in __init__
self.act = activations[ff_activation]
KeyError: 'gelu_new'
'gelu_new'
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with backend/nn/t5.py at the activation lookup in T5DenseGatedActDense, then trace how the configuration reaches it through backend/loader.py. Reproduce loading the reported SD3 checkpoint and verify that the missing gelu_new error no longer occurs during model initialization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- 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