sd-webui-controlnet icon indicating copy to clipboard operation
sd-webui-controlnet copied to clipboard

[Feature Request] Possibility of more than one ControlNet input?

Open Dekker3D opened this issue 2 years ago • 3 comments

This one may be iffy, but based on what I read, it seems like it might be possible to stack more than one ControlNet onto Stable Diffusion, at the same time. If that's possible, it would be really interesting to use that. Being able to define both depth and normals when generating images of a building, or depth + pose for characters, would allow a lot of control.

Dekker3D avatar Feb 13 '23 22:02 Dekker3D

Will implement with/after T2I-Adapter

Mikubill avatar Feb 17 '23 07:02 Mikubill

Yes it is possible and relatively easy to implement. There are 2 ways.

  1. Add weighted sum of multiple ControlNet intermediate hidden states to UNet down -> up skip connections. This is already implemented by T2I-Adapter, although they hardcoded weights and that only 2 Adapters can be used at the same time.
  2. Using Classifier-Free Guidance style, add eps-predition. This will be more expensive computationally but somewhat results images of better quality in my experiments.

CCRcmcpe avatar Feb 19 '23 04:02 CCRcmcpe

impl in https://github.com/Mikubill/sd-webui-controlnet/pull/262

Mikubill avatar Feb 22 '23 11:02 Mikubill