Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
be38b2d7
Unverified
Commit
be38b2d7
authored
Dec 19, 2022
by
Suraj Patil
Committed by
GitHub
Dec 19, 2022
Browse files
[UnCLIPPipeline] fix num_images_per_prompt (#1762)
duplicate maks for num_images_per_prompt
parent
32a5d70c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/diffusers/pipelines/unclip/pipeline_unclip.py
src/diffusers/pipelines/unclip/pipeline_unclip.py
+2
-0
No files found.
src/diffusers/pipelines/unclip/pipeline_unclip.py
View file @
be38b2d7
...
...
@@ -143,6 +143,7 @@ class UnCLIPPipeline(DiffusionPipeline):
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
)
if
do_classifier_free_guidance
:
uncond_tokens
=
[
""
]
*
batch_size
...
...
@@ -172,6 +173,7 @@ class UnCLIPPipeline(DiffusionPipeline):
uncond_text_encoder_hidden_states
=
uncond_text_encoder_hidden_states
.
view
(
batch_size
*
num_images_per_prompt
,
seq_len
,
-
1
)
uncond_text_mask
=
uncond_text_mask
.
repeat
(
1
,
num_images_per_prompt
)
# done duplicates
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment