Skip to content

IP adapter image embeds dimension #7112

@caiqi

Description

@caiqi

Describe the bug

https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion.py#L537C1-L538C1

In this line, single_image_embeds = torch.stack([single_image_embeds] * num_images_per_prompt, dim=0) will add a new dimension to single_image_embeds,making the image_embedding has 4 dimensions. Would be better to use torch.cat()?

Reproduction

It won't cause errors for now since the embedding is reshaped in attention processor. But current format looks strange.

Logs

No response

System Info

Latest

Who can help?

@yiyixuxu

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssues that haven't received updates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions