{"record":{"id":"7b61611d5e352e39","repo":"Comfy-Org/ComfyUI","slug":"first-last-frame-and-reference-media-are-mutually","errorCode":null,"errorMessage":"First/last frame and reference media are mutually exclusive. Use frames for an image-to-video prompt, or reference media for a reference-to-video prompt.","messagePattern":"First/last frame and reference media are mutually exclusive\\. Use frames for an image-to-video prompt, or reference media for a reference-to-video prompt\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_minimax.py","lineNumber":1096,"sourceCode":"\n        reference_images = {k: v for k, v in (model.get(\"reference_images\") or {}).items() if v is not None}\n        reference_videos = {k: v for k, v in (model.get(\"reference_videos\") or {}).items() if v is not None}\n        reference_audios = {k: v for k, v in (model.get(\"reference_audios\") or {}).items() if v is not None}\n        has_frames = first_frame is not None or last_frame is not None\n        has_references = bool(reference_images) or bool(reference_videos) or bool(reference_audios)\n        if has_frames and has_references:\n            raise ValueError(\n                \"First/last frame and reference media are mutually exclusive. Use frames for an \"\n                \"image-to-video prompt, or reference media for a reference-to-video prompt.\"\n            )","sourceCodeStart":1078,"sourceCodeEnd":1114,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_minimax.py#L1078-L1114","documentation":"Error \"First/last frame and reference media are mutually exclusive. Use frames for an image-to-video prompt, or reference media for a reference-to-video prompt.\" thrown in Comfy-Org/ComfyUI.","triggerScenarios":"Thrown at comfy_api_nodes/nodes_minimax.py:1096 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use either first/last frames or reference media, not both."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}