From dc1f220b3eb784b4035ef16b1d91fdb162bb3d0f Mon Sep 17 00:00:00 2001 From: Sergey Borisov Date: Tue, 27 Jun 2023 01:18:15 +0300 Subject: [PATCH] Fix wrong conditioning used --- invokeai/backend/stable_diffusion/diffusers_pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/backend/stable_diffusion/diffusers_pipeline.py b/invokeai/backend/stable_diffusion/diffusers_pipeline.py index 8493b4286f..aba0feaeca 100644 --- a/invokeai/backend/stable_diffusion/diffusers_pipeline.py +++ b/invokeai/backend/stable_diffusion/diffusers_pipeline.py @@ -635,7 +635,7 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline): control_latent_input = torch.cat([unet_latent_input] * 2) if cfg_injection: # only applying ControlNet to conditional instead of in unconditioned - encoder_hidden_states = torch.cat([conditioning_data.unconditioned_embeddings]) + encoder_hidden_states = conditioning_data.text_embeddings else: encoder_hidden_states = torch.cat([conditioning_data.unconditioned_embeddings, conditioning_data.text_embeddings])