This commit is contained in:
asagi4 2025-01-07 21:07:03 -05:00 committed by GitHub
commit ca38767a35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -367,6 +367,8 @@ def apply_control(h, control, name):
ctrl = control[name].pop()
if ctrl is not None:
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
except:
logging.warning("warning control could not be applied {} {}".format(h.shape, ctrl.shape))