diff --git a/invokeai/backend/stable_diffusion/diffusers_pipeline.py b/invokeai/backend/stable_diffusion/diffusers_pipeline.py index 58ea30ef48..ac693222ca 100644 --- a/invokeai/backend/stable_diffusion/diffusers_pipeline.py +++ b/invokeai/backend/stable_diffusion/diffusers_pipeline.py @@ -730,6 +730,14 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline): ] mid_block_res_sample += mid_sample + # guess mode handling from diffusers controlnet pipeline: + # if guess_mode and do_classifier_free_guidance: + # # Inferred ControlNet only for the conditional batch. + # # To apply the output of ControlNet to both the unconditional and conditional batches, + # # add 0 to the unconditional batch to keep it unchanged. + # down_block_res_samples = [torch.cat([torch.zeros_like(d), d]) for d in down_block_res_samples] + # mid_block_res_sample = torch.cat([torch.zeros_like(mid_block_res_sample), mid_block_res_sample]) + # predict the noise residual noise_pred = self.invokeai_diffuser.do_diffusion_step( x=unet_latent_input,