mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 05:22:34 +08:00
Merge branch 'master' of github.com:comfyanonymous/ComfyUI
This commit is contained in:
commit
15ff903b35
@ -167,7 +167,7 @@ class ControlNet(ControlBase):
|
|||||||
if x_noisy.shape[0] != self.cond_hint.shape[0]:
|
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)
|
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)
|
y = cond.get('y', None)
|
||||||
if y is not None:
|
if y is not None:
|
||||||
y = y.to(dtype)
|
y = y.to(dtype)
|
||||||
|
|||||||
@ -151,6 +151,11 @@ class BaseModel(torch.nn.Module):
|
|||||||
cross_attn = kwargs.get("cross_attn", None)
|
cross_attn = kwargs.get("cross_attn", None)
|
||||||
if cross_attn is not None:
|
if cross_attn is not None:
|
||||||
out['c_crossattn'] = conds.CONDCrossAttn(cross_attn)
|
out['c_crossattn'] = conds.CONDCrossAttn(cross_attn)
|
||||||
|
|
||||||
|
cross_attn_cnet = kwargs.get("cross_attn_controlnet", None)
|
||||||
|
if cross_attn_cnet is not None:
|
||||||
|
out['crossattn_controlnet'] = conds.CONDCrossAttn(cross_attn_cnet)
|
||||||
|
|
||||||
return out
|
return out
|
||||||
|
|
||||||
def load_model_weights(self, sd, unet_prefix=""):
|
def load_model_weights(self, sd, unet_prefix=""):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user