1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Fix temporal tiling for decoder, remove redundant tiles. (#6306)

This commit fixes the temporal tile size calculation, and removes
a redundant tile at the end of the range when its elements are
completely covered by the previous tile.

Co-authored-by: Andrew Kvochko <a.kvochko@lightricks.com>
This commit is contained in:
Andrew Kvochko
2025-01-01 21:29:01 +00:00
committed by GitHub
parent 79eea51a1d
commit 0f11d60afb
2 changed files with 2 additions and 2 deletions

View File

@@ -893,7 +893,7 @@ def tiled_scale_multidim(samples, function, tile=(64, 64), overlap=8, upscale_am
out = torch.zeros([s.shape[0], out_channels] + mult_list_upscale(s.shape[2:]), device=output_device)
out_div = torch.zeros([s.shape[0], out_channels] + mult_list_upscale(s.shape[2:]), device=output_device)
positions = [range(0, s.shape[d+2], tile[d] - overlap[d]) if s.shape[d+2] > tile[d] else [0] for d in range(dims)]
positions = [range(0, s.shape[d+2] - overlap[d], tile[d] - overlap[d]) if s.shape[d+2] > tile[d] else [0] for d in range(dims)]
for it in itertools.product(*positions):
s_in = s