Skip to content

Conversation

@DN6
Copy link
Collaborator

@DN6 DN6 commented Mar 19, 2024

What does this PR do?

There is a use case with the cascade decoder pipeline where a user might set num_image_per_prompt > 1 in the prior pipeline and pass the output to the decoder.

This results in a case where you have multiple image embeddings associated with a single prompt. This is causing an issue with the how the batch size is set for latents and prompt embeds in the decoder pipeline. T

Fixes #7377

This PR:

  1. Adds a fix to correctly set the batch size in the prompt embeds and latents to handle multiple embeddings per prompt.
  2. Adds a test to check that the correct number of outputs is produced by the decoder when multiple image embeddings are used with a single prompt.

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.

@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.

@DN6 DN6 changed the title Fix issue with pooled prompt embeds in SD Cascade Decoder Fix issue with prompt embeds and latents in SD Cascade Decoder with multiple image embeddings for a single prompt. Mar 19, 2024
@DN6 DN6 requested a review from yiyixuxu March 19, 2024 11:46
Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

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

thanks!

@yiyixuxu yiyixuxu merged commit 80ff4ba into main Mar 19, 2024
@yiyixuxu yiyixuxu deleted the cascade-num-images branch March 19, 2024 17:40
sayakpaul added a commit that referenced this pull request Mar 20, 2024
…ultiple image embeddings for a single prompt. (#7381)

* fix

* update

* update

---------

Co-authored-by: Sayak Paul <[email protected]>
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.

StableCascadeDecoderPipeline Error with num_images_per_prompt > 1

5 participants