mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-07 21:00:49 +08:00
Merge 945a8aa963 into 6ca3d5c011
This commit is contained in:
commit
dbbc8dd128
@ -367,6 +367,8 @@ def apply_control(h, control, name):
|
|||||||
ctrl = control[name].pop()
|
ctrl = control[name].pop()
|
||||||
if ctrl is not None:
|
if ctrl is not None:
|
||||||
try:
|
try:
|
||||||
|
if ctrl.shape[2] != h.shape[2] or ctrl.shape[3] != h.shape[3]:
|
||||||
|
ctrl = F.interpolate(ctrl.float(), size=(h.shape[2], h.shape[3]), mode="bicubic", align_corners=False).to(h.dtype)
|
||||||
h += ctrl
|
h += ctrl
|
||||||
except:
|
except:
|
||||||
logging.warning("warning control could not be applied {} {}".format(h.shape, ctrl.shape))
|
logging.warning("warning control could not be applied {} {}".format(h.shape, ctrl.shape))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user