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
c16761e9
Unverified
Commit
c16761e9
authored
Sep 28, 2022
by
Suraj Patil
Committed by
GitHub
Sep 28, 2022
Browse files
[CLIPGuidedStableDiffusion] take the correct text embeddings (#667)
take the correct text embeddings
parent
7f31142c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
examples/community/clip_guided_stable_diffusion.py
examples/community/clip_guided_stable_diffusion.py
+1
-1
No files found.
examples/community/clip_guided_stable_diffusion.py
View file @
c16761e9
...
@@ -284,7 +284,7 @@ class CLIPGuidedStableDiffusion(DiffusionPipeline):
...
@@ -284,7 +284,7 @@ class CLIPGuidedStableDiffusion(DiffusionPipeline):
# perform clip guidance
# perform clip guidance
if
clip_guidance_scale
>
0
:
if
clip_guidance_scale
>
0
:
text_embeddings_for_guidance
=
(
text_embeddings_for_guidance
=
(
text_embeddings
.
chunk
(
2
)[
0
]
if
do_classifier_free_guidance
else
text_embeddings
text_embeddings
.
chunk
(
2
)[
1
]
if
do_classifier_free_guidance
else
text_embeddings
)
)
noise_pred
,
latents
=
self
.
cond_fn
(
noise_pred
,
latents
=
self
.
cond_fn
(
latents
,
latents
,
...
...
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