Skip to content

Conversation

@patil-suraj
Copy link
Contributor

This PR fixes a bug num_images_per_prompt > 1. The attention maks also need to be duplicated along with the embeddings. (essentially all inputs should be duplicated)

Copy link
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Dec 19, 2022

The documentation is not available anymore as the PR was closed or merged.


text_embeddings = text_embeddings.repeat_interleave(num_images_per_prompt, dim=0)
text_encoder_hidden_states = text_encoder_hidden_states.repeat_interleave(num_images_per_prompt, dim=0)
text_mask = text_mask.repeat_interleave(num_images_per_prompt, dim=0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this doesn't work for mps, let's fix later.

@patil-suraj patil-suraj merged commit be38b2d into main Dec 19, 2022
@patil-suraj patil-suraj deleted the fix-unclip-pipe branch December 19, 2022 13:32
sliard pushed a commit to sliard/diffusers that referenced this pull request Dec 21, 2022
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
duplicate maks for num_images_per_prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants