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:
latent_control_input = latent_model_input
# controlnet inference
print("control_weight: ", control_weight)
down_block_res_samples, mid_block_res_sample = self.control_model(
latent_control_input,
timestep,
@ -1005,7 +1003,6 @@ class StableDiffusionGeneratorPipeline(StableDiffusionPipeline):
dtype=torch.float16,
do_classifier_free_guidance=True,
):
if not isinstance(image, torch.Tensor):
if isinstance(image, PIL.Image.Image):
image = [image]