From c38bbe73f11b4f053fbed65d79551f230c0af59c Mon Sep 17 00:00:00 2001 From: patil-suraj Date: Wed, 28 Sep 2022 17:32:11 +0200 Subject: [PATCH] take the correct text embeddings --- examples/community/clip_guided_stable_diffusion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/community/clip_guided_stable_diffusion.py b/examples/community/clip_guided_stable_diffusion.py index a34e8ab7edfc..1129e4b3bd94 100644 --- a/examples/community/clip_guided_stable_diffusion.py +++ b/examples/community/clip_guided_stable_diffusion.py @@ -284,7 +284,7 @@ def __call__( # perform clip guidance if clip_guidance_scale > 0: 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( latents,