Core implementation of ControlNet and MultiControlNet.

This commit is contained in:
user1 2023-04-29 00:43:21 -07:00 committed by Kent Keirsey
parent aaa093bef1
commit 901a277959

View File

@ -699,7 +699,6 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline):
for samples_prev, samples_curr in zip(down_block_res_samples, down_samples) for samples_prev, samples_curr in zip(down_block_res_samples, down_samples)
] ]
mid_block_res_sample += mid_sample mid_block_res_sample += mid_sample
# predict the noise residual # predict the noise residual
noise_pred = self.invokeai_diffuser.do_diffusion_step( noise_pred = self.invokeai_diffuser.do_diffusion_step(
latent_model_input, latent_model_input,
@ -1031,7 +1030,6 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline):
dtype=torch.float16, dtype=torch.float16,
do_classifier_free_guidance=True, do_classifier_free_guidance=True,
): ):
if not isinstance(image, torch.Tensor): if not isinstance(image, torch.Tensor):
if isinstance(image, PIL.Image.Image): if isinstance(image, PIL.Image.Image):
image = [image] image = [image]