1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Add a way to set different conditioning for the controlnet.

This commit is contained in:
comfyanonymous
2024-02-09 14:13:31 -05:00
parent fd73b5ee3a
commit 25a4805e51
2 changed files with 5 additions and 1 deletions

View File

@@ -166,7 +166,7 @@ class ControlNet(ControlBase):
if x_noisy.shape[0] != self.cond_hint.shape[0]:
self.cond_hint = broadcast_image_to(self.cond_hint, x_noisy.shape[0], batched_number)
context = cond['c_crossattn']
context = cond.get('crossattn_controlnet', cond['c_crossattn'])
y = cond.get('y', None)
if y is not None:
y = y.to(dtype)