Comfy-Org/ComfyUI · error · ValueError

SeedVR2TemporalChunk: expected

Error message

SeedVR2TemporalChunk: expected {SEEDVR2_LATENT_CHANNELS} latent channels; got shape {tuple(samples.shape)}.

What it means

After the rank check, SeedVR2TemporalChunk verifies the latent has 16 channels (SEEDVR2_LATENT_CHANNELS) in dim 1, matching the SeedVR2 VAE. A 5-D latent from a different model family (or wrong VAE) fails here with the full shape.

Solutions

  1. Use the SeedVR2 video VAE for encoding so the latent is (B, 16, T, H, W).
  2. Check the chain: the latent fed to Split must come from SeedVR2 encode/sample nodes.
  3. Print samples.shape[1]; anything other than 16 means the wrong VAE/model produced it.
Defensive patterns

Strategy: validation

Validate before calling

samples = latent['samples']
if samples.ndim != 5 or samples.shape[1] != 16:
    raise ValueError(f'need SeedVR2 latent (B,16,T,H,W), got {tuple(samples.shape)}')

Type guard

def is_seedvr_chunk_input(s) -> bool:
    return s.ndim == 5 and s.shape[1] == 16

Prevention

When it happens

Trigger: Passing a 5-D latent whose channel dim != 16 — e.g. a 48-channel video VAE latent from another architecture, or a 4-channel image latent with extra dims unsqueezed.

Common situations: Mixing video model pipelines (Wan/Hunyuan latents into the SeedVR2 chunker); loading a non-SeedVR2 VAE for the encode step.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/b568b61aa6b3993e. Report an issue: GitHub.

Appendix: source

Thrown at comfy_extras/nodes_seedvr.py:463

            ],
            outputs=[
                io.Latent.Output(display_name="latents", is_output_list=True,
                                 tooltip="The temporal chunks in sequence order."),
                io.Int.Output(display_name="temporal_overlap",
                              tooltip="The effective latent-frame overlap between adjacent chunks, for Merge SeedVR2 Latents."),
            ],
        )

    @classmethod
    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(

View on GitHub (pinned to 1c6d8d45b3)