From 4581f147a6347ae790d26c9c8fbd3536e573f112 Mon Sep 17 00:00:00 2001 From: Suraj Patil Date: Thu, 6 Oct 2022 18:12:54 +0200 Subject: [PATCH] Update clip_guided_stable_diffusion.py --- 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 db08a124d963..b24f987ded1f 100644 --- a/examples/community/clip_guided_stable_diffusion.py +++ b/examples/community/clip_guided_stable_diffusion.py @@ -148,7 +148,7 @@ def cond_fn( image = transforms.Resize(self.feature_extractor.size)(image) image = self.normalize(image) - image_embeddings_clip = self.clip_model.get_image_features(image).float() + image_embeddings_clip = self.clip_model.get_image_features(image) image_embeddings_clip = image_embeddings_clip / image_embeddings_clip.norm(p=2, dim=-1, keepdim=True) if use_cutouts: