From cd6f61503886ec6422f707975cf9db5d8e5ea18f Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Tue, 17 Dec 2024 09:42:17 -0500 Subject: [PATCH] Fix tiled vae not working with some shapes. --- comfy/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/comfy/utils.py b/comfy/utils.py index 34659305..d03693bb 100644 --- a/comfy/utils.py +++ b/comfy/utils.py @@ -805,6 +805,8 @@ def tiled_scale_multidim(samples, function, tile=(64, 64), overlap = 8, upscale_ for d in range(2, dims + 2): feather = round(get_upscale(d - 2, overlap[d - 2])) + if feather >= mask.shape[d]: + continue for t in range(feather): a = (t + 1) / feather mask.narrow(d, t, 1).mul_(a)