Comfy-Org/ComfyUI · error · ValueError
Reference mode '{MODE_AUDIO}' requires at least one referenc
Error message
Reference mode '{MODE_AUDIO}' requires at least one reference_audio input (or switch to '{MODE_TEXT}'). What it means
In 'audio reference' mode (MODE_AUDIO) the Seed-OSS audio node requires at least one connected reference_audio input, because the mode's whole purpose is timbre/sound transfer from clips. With an empty audio_indices list the node fails fast rather than sending a request the provider would reject.
Source
Thrown at comfy_api_nodes/nodes_bytedance.py:3165
def validate_seed_audio_inputs(
text_prompt: str,
mode: str,
audio_indices: list[int],
has_image: bool,
preset_voice: str | None = None,
) -> None:
validate_string(text_prompt, field_name="text_prompt", min_length=1, max_length=3000)
max_tag = max_audio_tag(text_prompt)
if mode == MODE_TEXT:
if max_tag:
raise ValueError(
f"The prompt references @Audio{max_tag}, but reference mode is '{MODE_TEXT}'. "
f"Switch to '{MODE_AUDIO}' and connect the reference clip(s)."
)
elif mode == MODE_AUDIO:
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 "View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Connect at least one audio clip to reference_audio_1.
- Or switch the mode back to 'text only' if no reference is intended.
Defensive patterns
Strategy: validation
Validate before calling
if mode == MODE_AUDIO and not audio_indices:
raise ValueError("audio reference mode needs at least one reference_audio input") Prevention
- Wire reference_audio_1 whenever the mode widget says 'audio reference'.
- Switch back to 'text only' when no clips are connected.
When it happens
Trigger: Setting mode='audio reference' on the audio node while no reference_audio inputs are connected (audio_indices is empty).
Common situations: Flipping the mode widget to try voice transfer without wiring clips; disconnected audio branch after graph edits.
Related errors
- Either first_frame or first_frame_asset_id is required.
- At least one reference image or video or asset is required.
- The prompt references @Audio{max_tag}, but reference mode is
- Connect reference_audio inputs in order without gaps: refere
- Reference mode '{MODE_IMAGE}' requires a reference_image inp
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/3fef38bde3cb83f4.
Report an issue: GitHub.