The MPS backend implements grid_sample but rejects padding_mode="border"
(RuntimeError: MPS: Unsupported Border padding mode), so the Frame
Interpolation node fails on Apple Silicon for every RIFE and FILM model.
PYTORCH_ENABLE_MPS_FALLBACK=1 does not help, as the op is implemented and
only the argument is rejected. The upstream PyTorch issue (#125098) has
been open since April 2024.
Clamping the sampling grid to the valid range makes padding_mode="zeros"
exactly equivalent to "border": with align_corners=True that range is
[-1, 1], and with align_corners=False it is +-(1 - 1/size) per axis.
Gated on device.type == "mps", so CUDA and CPU paths are unchanged.
Comfy-aimdo 0.4.12 increases error logging reliablity to help root
cause os errors in some of the C APIs that are causing issues for
some users.
The log is also unified with python logging, so non-terminal users
see the logs properly.
Aimdo 0.4.13 fixes a bug in async-offload + MRU primary weights
allocation. https://github.com/Comfy-Org/ComfyUI/issues/15284
This avoids name collision (circular imports) for external custom nodes,
for which the comfy path is pushed into sys.path so Python's own logging module
is shadowed otherwise.
fixes: #15229
This priority scheme was broken in the case where you have pin
registration exhaustion while loading a VBAR that gets a big evicition.
The weight would stay in the loaded set but inherit the MRU priority
against other workflow models WRT pin registration which leads to async
offload without pinning.
Fix by universally promiting active pin registration above workflow
pins without concern for the weights/weights-loaded split. This diverges
from the actual budgeting where the split still makes sense.
Changes:
Remove sequential scan hint
Prefer NVML pressure on windows
Add async malloc clamp option (unused by comfy so far)
Workaround AMD windows GPU virtual address space leak
The largest change is the NVML pressure, which works around a cuMemGetInfo
drift from actual VRAM in some circumstances.
Windows has proven this logic works for a long time and there are
corner cases where this materialization actual consumes real RAM
on linux.
Its not as bad as the original windows commit charge surge, but
its still a detectable transient leak. So simplify and unify.