Comfy-Org/ComfyUI · error · ValueError

kling-video-o1 does not support audio generation.

Error message

kling-video-o1 does not support audio generation.

What it means

Client-side capability guard: enabling generate_audio with kling-video-o1 raises immediately, because the o1 model has no audio-generation support in this node's contract. Checked before any request is sent.

Source

Thrown at comfy_api_nodes/nodes_kling.py:703

    @classmethod
    async def execute(
        cls,
        model_name: str,
        prompt: str,
        aspect_ratio: str,
        duration: int,
        resolution: str = "1080p",
        storyboards: dict | None = None,
        generate_audio: bool = False,
        seed: int = 0,
    ) -> IO.NodeOutput:
        _ = seed
        if model_name == "kling-video-o1":
            if duration not in (5, 10):
                raise ValueError("kling-video-o1 only supports durations of 5 or 10 seconds.")
            if generate_audio:
                raise ValueError("kling-video-o1 does not support audio generation.")
            if resolution == "4k":
                raise ValueError("kling-video-o1 does not support 4k resolution.")
        stories_enabled = storyboards is not None and storyboards["storyboards"] != "disabled"
        if stories_enabled and model_name == "kling-video-o1":
            raise ValueError("kling-video-o1 does not support storyboards.")
        validate_string(prompt, strip_whitespace=True, min_length=0 if stories_enabled else 1, max_length=2500)

        multi_shot = None
        multi_prompt_list = None
        if stories_enabled:
            count = int(storyboards["storyboards"].split()[0])
            multi_shot = True
            multi_prompt_list = []
            for i in range(1, count + 1):
                sb_prompt = storyboards[f"storyboard_{i}_prompt"]
                sb_duration = storyboards[f"storyboard_{i}_duration"]
                validate_string(sb_prompt, field_name=f"storyboard_{i}_prompt", min_length=1, max_length=512)
                multi_prompt_list.append(

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Disable the generate_audio option when using kling-video-o1
  2. Switch to a Kling model that supports audio generation if audio is required
  3. Generate audio in a separate node/pipeline (e.g. a TTS or audio model) and mux afterwards

Example fix

// before
model_name = "kling-video-o1"; generate_audio = True

// after
model_name = "kling-video-o1"; generate_audio = False
Defensive patterns

Strategy: validation

Validate before calling

def o1_audio_ok(model_name: str, generate_audio: bool) -> bool:
    return model_name != "kling-video-o1" or not generate_audio

assert o1_audio_ok(model_name, generate_audio)

Type guard

def audio_allowed(model_name: str) -> bool:
    return model_name != "kling-video-o1"

Try / catch

try:
    out = await kling_t2v_node(model_name=model, generate_audio=True, ...)
except ValueError as e:
    if "does not support audio" in str(e):
        out = await kling_t2v_node(model_name=model, generate_audio=False, ...)
    else:
        raise

Prevention

When it happens

Trigger: Workflow with model=kling-video-o1 and generate_audio=True (checkbox enabled); reusing a workflow built for an audio-capable model after switching the model dropdown to o1.

Common situations: Model switch without revisiting option toggles; copied community workflows with audio enabled by default.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/55e4b35402863db8. Report an issue: GitHub.