Skip to content

Commit

Permalink
send both negative prompt embeds to ORT SDXL (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube authored Sep 4, 2023
1 parent 3460335 commit 7f8e606
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _encode_prompt(
# Here we concatenate the unconditional and text embeddings into a single batch
# to avoid doing two forward passes
negative_prompt_embeds_list.append(negative_prompt_embeds)
negative_prompt_embeds = np.concatenate(negative_prompt_embeds, axis=-1)
negative_prompt_embeds = np.concatenate(negative_prompt_embeds_list, axis=-1)

pooled_prompt_embeds = np.repeat(pooled_prompt_embeds, num_images_per_prompt, axis=0)
negative_pooled_prompt_embeds = np.repeat(negative_pooled_prompt_embeds, num_images_per_prompt, axis=0)
Expand Down

0 comments on commit 7f8e606

Please sign in to comment.