Skip to content

Is that a bug of prompt2prompt pipeline with replace word pormpt? #12881

@lincion

Description

@lincion

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions