1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Fix StableUnCLIPImg2ImgPipeline handling of explicitly passed image embeddings (#2845)

This commit is contained in:
Eugene Lyapustin
2023-03-27 22:03:59 +04:00
committed by GitHub
parent 4c26cb9cc8
commit 7bc2fff1a5

View File

@@ -388,7 +388,7 @@ class StableUnCLIPImg2ImgPipeline(DiffusionPipeline):
# what the expected dimensions of inputs should be and how we handle the encoding.
repeat_by = num_images_per_prompt
if not image_embeds:
if image_embeds is None:
if not isinstance(image, torch.Tensor):
image = self.feature_extractor(images=image, return_tensors="pt").pixel_values