-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Description
Describe the bug
It performance the same when return different cross attention map, is implement error or just the problem with prompt2prompt.
Reproduction
Use stable-diffusion-2-1:
images = pipe(["A turtle playing with a ball", "A monkey playing with a ball"], generator=torch.Generator("cuda").manual_seed(34), cross_attention_kwargs={ "edit_type": "replace", "local_blend_words": ["turtle", "monkey"], "n_cross_replace": 0.4, "n_self_replace": 0.4 }).images
It performance the same when return different cross attention map:
class AttentionReplace(AttentionControlEdit): def replace_cross_attention(self, attn_base, att_replace): return attn_base.unsqueeze(0).expand(att_replace.shape[0], *attn_base.shape) return torch.einsum("hpw,bwn->bhpn", attn_base, self.mapper)
Logs
System Info
Diffusers=0.30.0
Who can help?
No response