stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

gelu_new !?!?!? Flux is completely broken in this project.

Open webmaster-exit-1 opened this issue 5 months ago • 2 comments

          I'm getting this error as well.
StateDict Keys: {'transformer': 780, 'vae': 244, 'text_encoder': 196, 'text_encoder_2': 220, 'ignore': 0}
Using Default T5 Data Type: torch.float16
Traceback (most recent call last):
  File "/var/home/$USER/stable-diffusion-webui-forge/modules_forge/main_thread.py", line 30, in work
    self.result = self.func(*self.args, **self.kwargs)
  File "/var/home/$USER/stable-diffusion-webui-forge/extensions/sd-webui-fsr-integration/modules/txt2img.py", line 123, in txt2img_function
    processed = processing.process_images(p)
  File "/var/home/$USER/stable-diffusion-webui-forge/modules/processing.py", line 800, in process_images
    p.sd_model, just_reloaded = forge_model_reload()
  File "/var/home/$USER/stable-diffusion-webui-forge/venv/lib64/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/var/home/$USER/stable-diffusion-webui-forge/modules/sd_models.py", line 494, in forge_model_reload
    sd_model = forge_loader(state_dict, additional_state_dicts=additional_state_dicts)
  File "/var/home/$USER/stable-diffusion-webui-forge/venv/lib64/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/var/home/$USER/stable-diffusion-webui-forge/backend/loader.py", line 283, in forge_loader
    component = load_huggingface_component(estimated_config, component_name, lib_name, cls_name, local_path, component_sd)
  File "/var/home/$USER/stable-diffusion-webui-forge/backend/loader.py", line 103, in load_huggingface_component
    model = IntegratedT5(config)
  File "/var/home/$USER/stable-diffusion-webui-forge/backend/nn/t5.py", line 211, in __init__
    self.transformer = T5(config)
  File "/var/home/$USER/stable-diffusion-webui-forge/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 "/var/home/$USER/stable-diffusion-webui-forge/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 "/var/home/$USER/stable-diffusion-webui-forge/backend/nn/t5.py", line 172, in <listcomp>
    [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 "/var/home/$USER/stable-diffusion-webui-forge/backend/nn/t5.py", line 159, in __init__
    self.layer.append(T5LayerFF(model_dim, ff_dim, ff_activation, gated_act))
  File "/var/home/$USER/stable-diffusion-webui-forge/backend/nn/t5.py", line 58, in __init__
    self.DenseReluDense = T5DenseGatedActDense(model_dim, ff_dim, ff_activation)
  File "/var/home/$USER/stable-diffusion-webui-forge/backend/nn/t5.py", line 44, in __init__
    self.act = activations[ff_activation]
KeyError: 'gelu_new'
'gelu_new'

So Flux is pretty much completely broken atm using this project.

Originally posted by @webmaster-exit-1 in https://github.com/lllyasviel/stable-diffusion-webui-forge/issues/1179#issuecomment-2350970713

webmaster-exit-1 avatar Sep 14 '24 12:09 webmaster-exit-1