Comfy-Org/ComfyUI · error · ValueError
@AudioN tags are not used in '{MODE_IMAGE}' mode; the prompt
Error message
@AudioN tags are not used in '{MODE_IMAGE}' mode; the prompt should contain only the text to synthesize. What it means
Thrown by the ByteDance Seed Audio node when reference_mode is 'image reference' and the prompt still contains @AudioN tags. In image mode the model takes voice characteristics from the reference image; @AudioN tags are not interpreted and the prompt should be plain synthesis text. max_tag being non-zero means the tag parser found at least one @AudioN reference.
Source
Thrown at comfy_api_nodes/nodes_bytedance.py:3182
if not audio_indices:
raise ValueError(
f"Reference mode '{MODE_AUDIO}' requires at least one reference_audio input "
f"(or switch to '{MODE_TEXT}')."
)
if audio_indices != list(range(1, len(audio_indices) + 1)):
raise ValueError(
"Connect reference_audio inputs in order without gaps: reference_audio_1, then _2, then _3."
)
if max_tag > len(audio_indices):
raise ValueError(
f"The prompt references @Audio{max_tag}, but only {len(audio_indices)} "
f"reference audio(s) are connected."
)
elif mode == MODE_IMAGE:
if not has_image:
raise ValueError(f"Reference mode '{MODE_IMAGE}' requires a reference_image input.")
if max_tag:
raise ValueError(
f"@AudioN tags are not used in '{MODE_IMAGE}' mode; the prompt should contain "
f"only the text to synthesize."
)
elif mode == MODE_SPEAKER:
if not preset_voice or preset_voice not in SEED_AUDIO_VOICE_MAP:
raise ValueError(f"Reference mode '{MODE_SPEAKER}' requires selecting a preset voice.")
if max_tag > 1:
raise ValueError(
f"'{MODE_SPEAKER}' mode uses a single voice, so @Audio{max_tag} is out of range. "
f"Remove the @AudioN tags — the whole prompt is read in the selected voice."
)
else:
raise ValueError(f"Unknown reference mode: {mode!r}")
class ByteDanceSeedAudioNode(IO.ComfyNode):
@classmethodView on GitHub (pinned to 1c6d8d45b3)
Solutions
- Strip all @AudioN tags from the prompt so it contains only the text to synthesize.
- If you intended per-clip voice cloning, switch reference_mode back to 'audio reference' and connect the matching reference_audio inputs.
Example fix
// before: prompt = "<@Audio1>Hello there" (mode: image reference) // after: prompt = "Hello there" (mode: image reference)
Defensive patterns
Strategy: validation
Validate before calling
import re
def strip_audio_tags_for_mode(prompt: str, mode: str) -> str:
if mode == "image reference":
return re.sub(r"@Audio\d+", "", prompt).strip()
return prompt Prevention
- When changing reference_mode, re-read the prompt and remove tags the new mode does not use.
- Maintain separate prompt templates per mode (tagged for audio reference, plain for image/preset).
When it happens
Trigger: reference_mode == 'image reference', a reference image IS connected, but the text_prompt contains one or more @AudioN tags (max_tag > 0).
Common situations: User reuses a multi-speaker dialogue prompt written for 'audio reference' mode after switching the mode dropdown to 'image reference'; template prompts that always include speaker tags.
Related errors
- '{MODE_SPEAKER}' mode uses a single voice, so @Audio{max_tag
- The prompt references @Audio{max_tag}, but only {len(audio_i
- Reference mode '{MODE_IMAGE}' requires a reference_image inp
- Reference mode '{MODE_SPEAKER}' requires selecting a preset
- Unknown reference mode: {mode!r}
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/1e5bbf02958fd0fb.
Report an issue: GitHub.