ComfyUI Node

Lyria 2 Text To Music

Text-to-music in ComfyUI, because the video deserves a soundtrack too

By GoogleCloudPlatform·Created 8 months ago·Updated about a month ago· 47
Lyria 2 Text To Music
    • audio
    promptGenerate a light bass summer tune
    sample_count1
    negative_prompt
    seed0
    gcp_project_id
    gcp_region

    Most ComfyUI graphs end in pixels. This one ends in audio. The Lyria 2 node generates full music tracks from a text description using Google's Lyria model on Vertex AI, and it returns the result as a standard ComfyUI AUDIO dictionary - waveform plus sample rate - so it can feed the same audio nodes you'd use for anything else. Veo 3.1 already does native video audio, but if you want a separate score, a bed, or music for a video you made elsewhere, this is how you get it without leaving the graph.

    How it works

    It's a one-trick node with a small surface: send your description to the lyria-002 model, poll the API, get back an audio waveform. The node validates a couple of constraints up front - an empty prompt throws immediately, and there's a rule about seeds and sample counts that trips people up (more on that below). The output audio is a plain AUDIO-typed dict, so it wires into the same audio I/O your other audio tooling uses.

    Inputs that matter

    • prompt - describe the music, not just the mood. "A light bass summer tune" is the default placeholder; you'll get better results being specific about genre, tempo, and instrumentation.
    • negative_prompt - optional, and genuinely useful here. "No drums" or "no vocals" actually changes what comes back.
    • sample_count - how many variations to generate, 1 to 4. Billed per sample.
    • seed - reproducibility, but with a catch: the tooltip says it must be greater than 0, and the node hard-errors if you set a specific seed and a sample_count above 1 at the same time. Pick one.
    • gcp_project_id / gcp_region - the usual pack requirement; every call needs a Google Cloud project and region.

    Installing it

    Same pack, same install as everything in this repo:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GoogleCloudPlatform/comfyui-google-genmedia-custom-nodes
    pip install -r comfyui-google-genmedia-custom-nodes/requirements.txt
    

    Or ComfyUI Manager → search comfyui-google-genmedia-custom-nodes → Install. Restart and it's under Google AI/Lyria2. No model files; the deps are Google SDKs. Don't forget gcloud auth application-default login for a local install, and set the project/region on the node.

    Honest notes

    Music generation is billed per track, and Lyria's output is a solid, competent track rather than a hit - fine for drafts, prototypes, and background beds. The sample_count vs seed restriction is the one thing that'll actually stop you mid-flow, so decide early: deterministic or multiple takes, not both. It's a niche node in a video/image pack, but if you're building end-to-end generated content, it's the missing piece that makes the timeline sound finished instead of empty.

    CategoryGoogle AI/Lyria2

    Inputs (6)

    NameTypeDefaultDescription
    promptSTRINGGenerate a light bass summer tune
    sample_countINT11–4294967295
    negative_promptoptSTRING
    seedoptINT00–4294967295Seed for reproducibility. Must be greater than 0.
    gcp_project_idoptSTRING
    gcp_regionoptSTRING

    Outputs (1)

    NameTypeDescription
    audioAUDIO