Skip to content

Commit c16761e

Browse files
authored
[CLIPGuidedStableDiffusion] take the correct text embeddings (#667)
take the correct text embeddings
1 parent 7f31142 commit c16761e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/community/clip_guided_stable_diffusion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def __call__(
284284
# perform clip guidance
285285
if clip_guidance_scale > 0:
286286
text_embeddings_for_guidance = (
287-
text_embeddings.chunk(2)[0] if do_classifier_free_guidance else text_embeddings
287+
text_embeddings.chunk(2)[1] if do_classifier_free_guidance else text_embeddings
288288
)
289289
noise_pred, latents = self.cond_fn(
290290
latents,

0 commit comments

Comments
 (0)