it seems like only single-image inference is supported in StableDiffusionControlNetPipeline.
For multi-image inference, one could go to the location of the diffusers package and modify the "# 2. pre-process" code block (around line 600).
original:
# 2. pre-process
sample = self.conv_in(sample)
if controlnet_hint is not None:
sample += self.controlnet_input_hint_block(controlnet_hint)
modified:
# 2. pre-process
sample = self.conv_in(sample)
if controlnet_hint is not None:
hint = self.controlnet_input_hint_block(controlnet_hint)
if hint.shape[0] > 1:
hint = hint.repeat(2, 1, 1, 1)
sample += hint
Thanks for pointing out, but StableDiffusionControlNetPipeline has been officially supported in diffusers now, I will update this tutorial soon to keep pace with it.
Hi,
it seems like only single-image inference is supported in StableDiffusionControlNetPipeline.
For multi-image inference, one could go to the location of the diffusers package and modify the "# 2. pre-process" code block (around line 600).
original:
modified:
Hope it helps.