Skip to content

Conversation

@nikitabalabin
Copy link
Contributor

@nikitabalabin nikitabalabin commented Mar 4, 2024

Fix generation of multiple images with multiple prompts, e.g len(prompts)>1, num_images_per_prompt>1

What does this PR do?

Fixes # (issue)

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@sayakpaul
Copy link
Member

Can you show an example of where the current code (without the changes in this PR) fails?

@nikitabalabin
Copy link
Contributor Author

from diffusers import PixArtAlphaPipeline, Transformer2DModel
import torch

pipe = PixArtAlphaPipeline.from_pretrained("PixArt-alpha/PixArt-XL-2-1024-MS", 
                                           torch_dtype=torch.float16).to('cuda')
prompts = ["a man", "cat riding a bike in the forest, watercolor style"]   
images = pipe(prompt=prompts, num_images_per_prompt=2).images

images[1] and images[2] will be generated with wrong prompt_attention_mask.

@sayakpaul
Copy link
Member

Thanks! Could we add a fast test for this as well?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Apr 3, 2024
@yiyixuxu
Copy link
Collaborator

yiyixuxu commented Dec 3, 2024

hi @nikitabalabin
thanks for the PR! let us know if you're still interested in finishing it:)

@yiyixuxu
Copy link
Collaborator

yiyixuxu commented Dec 3, 2024

can we run make style too?

@github-actions github-actions bot removed the stale Issues that haven't received updates label Dec 3, 2024
@hlky hlky closed this Dec 3, 2024
@sayakpaul
Copy link
Member

@hlky was the close expected?

@hlky
Copy link
Contributor

hlky commented Dec 3, 2024

Rebase to fix conflict went wrong 😅

@hlky hlky mentioned this pull request Dec 3, 2024
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