yuval-alaluf/Attend-and-Excite

KeyError:'up' when generating images

caldwecg opened this issue · 2 comments

Trying to run the StableDiffusionAttendAndExcitePipeline and keep running into the following error:

Traceback (most recent call last):
  File "/home/ubuntu/imakeimages.py", line 31, in <module>
    result = pipe(
  File "/usr/local/lib/python3.10/dist-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py", line 876, in __call__
    max_attention_per_index = self._aggregate_and_get_max_attention_per_token(
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py", line 565, in _aggregate_and_get_max_attention_per_token
    attention_maps = self.attention_store.aggregate_attention(
  File "/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_attend_and_excite.py", line 99, in aggregate_attention
    for item in attention_maps[location]:
KeyError: 'up'

Any idea what is going wrong? Happy to share more on my setup if needed

Hi @caldwecg, thanks for your interest!
Are you sure you followed the package version specified in the requirements file?

closing this due to inactivity, please re-open if necessary