Comfy-Org/ComfyUI · error · ValueError
SeedVR2TemporalChunk: chunking_mode must be 'auto' or 'manua
Error message
SeedVR2TemporalChunk: chunking_mode must be 'auto' or 'manual'; got {mode!r}. What it means
SeedVR2TemporalChunk reads the chunking mode out of the chunking_mode primitive dict and requires exactly 'auto' or 'manual'. This mirrors the UI combo; any other string — stale value, casing, or typo from a hand-built prompt — is rejected.
Source
Thrown at comfy_extras/nodes_seedvr.py:473
def execute(cls, latent, temporal_overlap, chunking_mode) -> io.NodeOutput:
samples = latent["samples"]
if samples.ndim != 5:
raise ValueError(
f"SeedVR2TemporalChunk: expected a 5-D video latent (B, C, T, H, W); "
f"got shape {tuple(samples.shape)}."
)
if samples.shape[1] != SEEDVR2_LATENT_CHANNELS:
raise ValueError(
f"SeedVR2TemporalChunk: expected {SEEDVR2_LATENT_CHANNELS} latent channels; "
f"got shape {tuple(samples.shape)}."
)
if temporal_overlap < 0:
raise ValueError(
f"SeedVR2TemporalChunk: temporal_overlap must be >= 0; got {temporal_overlap}."
)
mode = chunking_mode["chunking_mode"]
if mode not in ("auto", "manual"):
raise ValueError(
f"SeedVR2TemporalChunk: chunking_mode must be 'auto' or 'manual'; "
f"got {mode!r}."
)
t_latent = samples.shape[2]
t_pixel = 4 * (t_latent - 1) + 1
if mode == "auto":
free_gb = comfy.model_management.get_free_memory(
comfy.model_management.get_torch_device()) / (1024 ** 3)
mpx_per_frame = (samples.shape[0] * samples.shape[3] * samples.shape[4]) * (BYTEDANCE_VAE_SPATIAL_DOWNSAMPLE ** 2) / 1e6
budget_gb = free_gb - SEEDVR2_CHUNK_RESERVED_GIB - SEEDVR2_CHUNK_SIGMA_K * SEEDVR2_CHUNK_SIGMA_GIB
chunk_latent_max = max(1, int(budget_gb / (SEEDVR2_CHUNK_GIB_PER_MPX_FRAME * mpx_per_frame)))
frames_per_chunk = min(4 * (chunk_latent_max - 1) + 1, t_pixel)
logging.info(
"SeedVR2TemporalChunk auto: free=%.2fGiB, %.2fMpx -> frames_per_chunk=%d (t_pixel=%d).",
free_gb, mpx_per_frame, frames_per_chunk, t_pixel,
)
else:View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Set chunking_mode to 'auto' or 'manual' exactly (lowercase).
- Re-save the workflow in the current UI so the combo emits a valid value.
- When building prompts programmatically, validate against {'auto','manual'} before queueing.
Example fix
# before
mode = {'chunking_mode': 'Automatic'}
# after
mode = {'chunking_mode': 'auto'} Defensive patterns
Strategy: validation
Validate before calling
mode = chunking_mode['chunking_mode']
if mode not in ('auto', 'manual'):
raise ValueError(f"chunking_mode must be 'auto' or 'manual', got {mode!r}") Type guard
def is_valid_chunk_mode(v) -> bool:
return v in ('auto', 'manual') Prevention
- Copy combo values from the node definition, not memory.
- Lowercase, exact strings only.
- Validate prompt JSON enums before queueing.
When it happens
Trigger: Supplying chunking_mode = {'chunking_mode': 'Auto'}, 'automatic', or a removed mode name via the API or an edited workflow JSON.
Common situations: Workflows saved by older/newer ComfyUI versions where the combo values changed; scripts injecting arbitrary strings; case mismatches.
Related errors
- SeedVR2PostProcessing: unknown color_correction_method {colo
- SeedVR2TemporalChunk: expected a 5-D video latent (B, C, T,
- SeedVR2TemporalChunk: expected {SEEDVR2_LATENT_CHANNELS} lat
- SeedVR2TemporalChunk: temporal_overlap must be >= 0; got {te
- SeedVR2TemporalChunk: frames_per_chunk must be a 4n+1 pixel-
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/5adb52ac57181132.
Report an issue: GitHub.