mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
Fix tiled hunyuan video VAE encode issue.
Some shapes like 1024x1024 with tile_size 256 and overlap 64 had issues.
This commit is contained in:
parent
3cacd3fca5
commit
52c1d933b2
@ -807,7 +807,7 @@ def tiled_scale_multidim(samples, function, tile=(64, 64), overlap=8, upscale_am
|
|||||||
upscaled = []
|
upscaled = []
|
||||||
|
|
||||||
for d in range(dims):
|
for d in range(dims):
|
||||||
pos = max(0, min(s.shape[d + 2] - (overlap[d] + 1), it[d]))
|
pos = max(0, min(s.shape[d + 2] - overlap[d], it[d]))
|
||||||
l = min(tile[d], s.shape[d + 2] - pos)
|
l = min(tile[d], s.shape[d + 2] - pos)
|
||||||
s_in = s_in.narrow(d + 2, pos, l)
|
s_in = s_in.narrow(d + 2, pos, l)
|
||||||
upscaled.append(round(get_scale(d, pos)))
|
upscaled.append(round(get_scale(d, pos)))
|
||||||
|
Loading…
Reference in New Issue
Block a user