{"record":{"id":"9a6d5de540668763","repo":"Comfy-Org/ComfyUI","slug":"unknown-reference-mode-mode-r","errorCode":null,"errorMessage":"Unknown reference mode: {mode!r}","messagePattern":"Unknown reference mode: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance.py","lineNumber":3195,"sourceCode":"            )\n    elif mode == MODE_IMAGE:\n        if not has_image:\n            raise ValueError(f\"Reference mode '{MODE_IMAGE}' requires a reference_image input.\")\n        if max_tag:\n            raise ValueError(\n                f\"@AudioN tags are not used in '{MODE_IMAGE}' mode; the prompt should contain \"\n                f\"only the text to synthesize.\"\n            )\n    elif mode == MODE_SPEAKER:\n        if not preset_voice or preset_voice not in SEED_AUDIO_VOICE_MAP:\n            raise ValueError(f\"Reference mode '{MODE_SPEAKER}' requires selecting a preset voice.\")\n        if max_tag > 1:\n            raise ValueError(\n                f\"'{MODE_SPEAKER}' mode uses a single voice, so @Audio{max_tag} is out of range. \"\n                f\"Remove the @AudioN tags — the whole prompt is read in the selected voice.\"\n            )\n    else:\n        raise ValueError(f\"Unknown reference mode: {mode!r}\")\n\n\nclass ByteDanceSeedAudioNode(IO.ComfyNode):\n\n    @classmethod\n    def define_schema(cls) -> IO.Schema:\n        return IO.Schema(\n            node_id=\"ByteDanceSeedAudio\",\n            display_name=\"ByteDance Seed Audio 1.0\",\n            category=\"partner/audio/ByteDance\",\n            description=(\n                \"Generate speech, music, sound effects and multi-speaker dialogue from a single prompt \"\n                \"with ByteDance Seed Audio 1.0. Describe the voice(s), emotion, ambience, background music \"\n                \"and sound effects in the prompt, and include the lines to speak. Optionally pick a built-in \"\n                \"preset voice, clone voices from up to 3 reference clips (tagged @Audio1-3 in the prompt), \"\n                \"or derive a voice from a character image. Up to 2 minutes of audio per run. \"\n                \"The multilingual model supports 20 languages and timestamp-based timing control.\"\n            ),","sourceCodeStart":3177,"sourceCodeEnd":3213,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance.py#L3177-L3213","documentation":"Thrown by the ByteDance Seed Audio reference-mode validation when the mode string matches none of the four known modes ('text only', 'audio reference', 'image reference', 'preset voice'). The UI combo cannot normally produce this value, so it almost always indicates a hand-edited or version-mismatched workflow JSON.","triggerScenarios":"reference_mode arrives as a string outside the four MODE_* constants, e.g. an old workflow saved with a different label, or a programmatic/validated_prompt API call passing an arbitrary string.","commonSituations":"Loading a workflow saved by a different ComfyUI version where mode labels were renamed; constructing the node input via the HTTP API with a typo'd mode string; manually editing workflow JSON.","solutions":["Delete and re-add the node in the current ComfyUI version so the combo repopulates with valid mode labels.","If driving via API, set reference_mode to one of: 'text only', 'audio reference', 'image reference', 'preset voice'.","Check the workflow JSON for the reference_mode value and fix the typo or stale label."],"exampleFix":"// before (API prompt): \"reference_mode\": \"image\"\n// after (API prompt):  \"reference_mode\": \"image reference\"","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"SEED_AUDIO_MODES = {\"text only\", \"audio reference\", \"image reference\", \"preset voice\"}\n\ndef is_valid_reference_mode(mode: str) -> bool:\n    return mode in SEED_AUDIO_MODES","tryCatchPattern":null,"preventionTips":["When driving ComfyUI via the HTTP API, validate reference_mode against the four literal labels before queueing.","After version upgrades, re-add freshly created nodes instead of reusing old workflow JSON."],"tags":["comfyui","bytedance","seed-audio","validation","enum","workflow-compat"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}