sd-forge-layerdiffuse icon indicating copy to clipboard operation
sd-forge-layerdiffuse copied to clipboard

AttributeError: 'TimestepEmbedSequential' object has no attribute '1'

Open ValerioL29 opened this issue 1 year ago • 3 comments

Description

Hey guys, I met an issue when I am trying the "SD1.5 Generate Everything together" function. The forge backend raised an error -

*** Error running process_before_every_sampling: /some_path/Workspaces/stable-diffusion-webui-forge/extensions/sd-forge-layerdiffuse/scripts/forge_layerdiffusion.py
    Traceback (most recent call last):
      File "/some_path/Workspaces/stable-diffusion-webui-forge/modules/scripts.py", line 835, in process_before_every_sampling
        script.process_before_every_sampling(p, *script_args, **kwargs)
      File "/some_path/Workspaces/stable-diffusion-webui-forge/extensions/sd-forge-layerdiffuse/scripts/forge_layerdiffusion.py", line 247, in process_before_every_sampling
        patcher = AttentionSharingPatcher(unet, frames=3, use_control=False)
      File "/some_path/Workspaces/stable-diffusion-webui-forge/extensions/sd-forge-layerdiffuse/lib_layerdiffusion/attention_sharing.py", line 208, in __init__
        attn_module = utils.get_attr(unet.model.diffusion_model, real_key)
      File "/some_path/Workspaces/stable-diffusion-webui-forge/ldm_patched/modules/utils.py", line 306, in get_attr
        obj = getattr(obj, name)
      File "/some_path/miniconda3/envs/sld/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1688, in __getattr__
        raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
    AttributeError: 'TimestepEmbedSequential' object has no attribute '1

Does anyone know how to solve this problem?

Setup

  • NVIDIA V100 16G
  • Python 3.10
  • Linux x64

ValerioL29 avatar Mar 12 '24 07:03 ValerioL29

I have encountered the same problem as you. How did you solve it? Thank you

DiscreteLink avatar Mar 14 '24 03:03 DiscreteLink

I have encountered the same problem as you. How did you solve it? Thank you

@DiscreteLink OK, so basically, I did not change anything instead of switching the underlying model from "Juggernaut-XL" to "realisticVisionV51_v51VAE." It was a mistake when I first played with the SDXL functions, and everything was OK. However, when I switched to SD1.5 functions, I did not switch the model into the SD1.5 model, and the error showed up. Then, I downloaded the SD1.5 model and reloaded the WebUI. Things just worked fine.

First, check if you have downloaded and selected the model correctly. Then, please follow the setting as the author states.

I hope these may help you deal with the issue :)

ValerioL29 avatar Mar 14 '24 04:03 ValerioL29

I also seem to realize that I am not using ST1.5, thank you very much

DiscreteLink avatar Mar 14 '24 05:03 DiscreteLink