{"record":{"id":"db3d3f19fee60812","repo":"Comfy-Org/ComfyUI","slug":"seedvr2temporalmerge-temporal-overlap-must-be","errorCode":null,"errorMessage":"SeedVR2TemporalMerge: temporal_overlap must be >= 0; got {temporal_overlap}.","messagePattern":"SeedVR2TemporalMerge: temporal_overlap must be >= 0; got (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_extras/nodes_seedvr.py","lineNumber":541,"sourceCode":"            category=\"model/latent/batch\",\n            is_input_list=True,\n            description=\"Recombine sampled SeedVR2 latent temporal chunks into one latent, crossfading each overlap with a Hann window sized by the temporal_overlap wired from Split SeedVR2 Latent.\",\n            search_aliases=[\"seedvr2\", \"merge\", \"temporal\", \"hann\", \"crossfade\"],\n            inputs=[\n                io.Latent.Input(\"latents\", tooltip=\"The sampled temporal chunks in sequence order.\"),\n                io.Int.Input(\"temporal_overlap\", default=0, min=0, max=16384, force_input=True,\n                             tooltip=\"The temporal_overlap output of Split SeedVR2 Latent. 0 = plain concatenation.\"),\n            ],\n            outputs=[\n                io.Latent.Output(display_name=\"latent\", tooltip=\"The recombined full-length latent.\"),\n            ],\n        )\n\n    @classmethod\n    def execute(cls, latents, temporal_overlap) -> io.NodeOutput:\n        temporal_overlap = temporal_overlap[0]\n        if temporal_overlap < 0:\n            raise ValueError(\n                f\"SeedVR2TemporalMerge: temporal_overlap must be >= 0; got {temporal_overlap}.\"\n            )\n        chunks = [entry[\"samples\"] for entry in latents]\n        first = chunks[0]\n        if first.ndim != 5:\n            raise ValueError(\n                f\"SeedVR2TemporalMerge: expected 5-D video latents (B, C, T, H, W); \"\n                f\"chunk 0 has shape {tuple(first.shape)}.\"\n            )\n        for i, chunk in enumerate(chunks[1:], start=1):\n            if chunk.shape[:2] != first.shape[:2] or chunk.shape[3:] != first.shape[3:]:\n                raise ValueError(\n                    f\"SeedVR2TemporalMerge: chunk {i} shape {tuple(chunk.shape)} does not \"\n                    f\"match chunk 0 shape {tuple(first.shape)} outside the temporal axis.\"\n                )\n            if i < len(chunks) - 1 and chunk.shape[2] != first.shape[2]:\n                raise ValueError(\n                    f\"SeedVR2TemporalMerge: chunk {i} has {chunk.shape[2]} latent frames but \"","sourceCodeStart":523,"sourceCodeEnd":559,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_extras/nodes_seedvr.py#L523-L559","documentation":"SeedVR2TemporalMerge.execute takes temporal_overlap from the latents' paired Int output (temporal_overlap[0], force_input so APIs can pass anything). A negative overlap would corrupt the merge-step arithmetic, so it is rejected up front with this message.","triggerScenarios":"Calling the merge node via the API with temporal_overlap < 0, or wiring a computed integer that went negative (e.g. overlap - 1 when overlap was 0).","commonSituations":"Programmatic workflows that derive overlap from the split node's output and subtract a margin; mismatched split/merge parameter pairs; hand-edited workflow JSON.","solutions":["Pass the temporal_overlap value that the paired SeedVR2TemporalChunk node output, unmodified.","Clamp before queueing: max(0, overlap).","Keep split and merge nodes' overlap values in sync — the merge must use the split's reported effective overlap."],"exampleFix":"# before\nmerge_inputs = {'temporal_overlap': split_overlap - 1}  # -1 when split_overlap == 0\n\n# after\nmerge_inputs = {'temporal_overlap': split_overlap}","handlingStrategy":"validation","validationCode":"temporal_overlap = max(0, int(latents_overlap_value))\nif temporal_overlap < 0:\n    raise ValueError('temporal_overlap must be >= 0')","typeGuard":"def is_valid_merge_overlap(v) -> bool:\n    return isinstance(v, int) and v >= 0","tryCatchPattern":null,"preventionTips":["Pipe the split node's temporal_overlap output straight into the merge node.","Never recompute/adjust the overlap between split and merge.","Clamp computed values with max(0, x) in API-driven workflows."],"tags":["seedvr","chunking","merge","validation","integer"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}