From e9cf4659d2071afb47a16712d0df7681da293b07 Mon Sep 17 00:00:00 2001 From: Talmaj Marinc Date: Wed, 25 Mar 2026 22:05:12 +0100 Subject: [PATCH] Base frame_seq_len on the padded token grid. --- comfy/k_diffusion/sampling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy/k_diffusion/sampling.py b/comfy/k_diffusion/sampling.py index 5bab263bd..33c8552e3 100644 --- a/comfy/k_diffusion/sampling.py +++ b/comfy/k_diffusion/sampling.py @@ -1827,8 +1827,8 @@ def sample_ar_video(model, x, sigmas, extra_args=None, callback=None, disable=No seed = extra_args.get("seed", 0) bs, c, lat_t, lat_h, lat_w = x.shape - frame_seq_len = (lat_h // 2) * (lat_w // 2) - num_blocks = -(-lat_t // num_frame_per_block) # ceiling division + frame_seq_len = -(-lat_h // 2) * -(-lat_w // 2) # ceiling division + num_blocks = -(-lat_t // num_frame_per_block) # ceiling division inner_model = model.inner_model.inner_model causal_model = inner_model.diffusion_model