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 7fb29dabff
commit 940e3b6635

View File

@ -660,8 +660,6 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline):
else: else:
latent_control_input = latent_model_input latent_control_input = latent_model_input
# controlnet inference # controlnet inference
print("control_weight: ", control_weight)
down_block_res_samples, mid_block_res_sample = self.control_model( down_block_res_samples, mid_block_res_sample = self.control_model(
latent_control_input, latent_control_input,
timestep, timestep,
@ -1005,7 +1003,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]