mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-15 03:27:24 +08:00
Fix void failing with RuntimeError: start (0) + length (464) exceeds dimension size (461).
This commit is contained in:
parent
a5189fed51
commit
dce0c22b69
@ -1164,12 +1164,18 @@ def tiled_scale_multidim(samples, function, tile=(64, 64), overlap=8, upscale_am
|
|||||||
|
|
||||||
o = out
|
o = out
|
||||||
o_d = out_div
|
o_d = out_div
|
||||||
|
ps_view = ps
|
||||||
|
mask_view = mask
|
||||||
for d in range(dims):
|
for d in range(dims):
|
||||||
o = o.narrow(d + 2, upscaled[d], mask.shape[d + 2])
|
l = min(ps_view.shape[d + 2], o.shape[d + 2] - upscaled[d])
|
||||||
o_d = o_d.narrow(d + 2, upscaled[d], mask.shape[d + 2])
|
o = o.narrow(d + 2, upscaled[d], l)
|
||||||
|
o_d = o_d.narrow(d + 2, upscaled[d], l)
|
||||||
|
if l < ps_view.shape[d + 2]:
|
||||||
|
ps_view = ps_view.narrow(d + 2, 0, l)
|
||||||
|
mask_view = mask_view.narrow(d + 2, 0, l)
|
||||||
|
|
||||||
o.add_(ps * mask)
|
o.add_(ps_view * mask_view)
|
||||||
o_d.add_(mask)
|
o_d.add_(mask_view)
|
||||||
|
|
||||||
if pbar is not None:
|
if pbar is not None:
|
||||||
pbar.update(1)
|
pbar.update(1)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user