Fix tiled vae not working with some shapes.

This commit is contained in:
comfyanonymous 2024-12-17 09:42:17 -05:00
parent 517669aaa3
commit cd6f615038

View File

@ -805,6 +805,8 @@ def tiled_scale_multidim(samples, function, tile=(64, 64), overlap = 8, upscale_
for d in range(2, dims + 2): for d in range(2, dims + 2):
feather = round(get_upscale(d - 2, overlap[d - 2])) feather = round(get_upscale(d - 2, overlap[d - 2]))
if feather >= mask.shape[d]:
continue
for t in range(feather): for t in range(feather):
a = (t + 1) / feather a = (t + 1) / feather
mask.narrow(d, t, 1).mul_(a) mask.narrow(d, t, 1).mul_(a)