ComfyUI Node

Lyria Music Generation

A full orchestra in a text box

By khanhlvg·Created about a year ago·Updated about a year ago· 4
Lyria Music Generation
    • AUDIO
    project_id
    locationus-central1
    promptAn epic, cinematic soundtrack with a full orchestra, soaring strings, and dramatic percussion.
    output_gcs_bucket
    sample_count1
    seed3418984259

    Lyria is Google's music generation model, and this node drops it into ComfyUI as a text-to-audio box. You type a description of a track, it returns an AUDIO tensor you can play, save, or attach to a video in the same graph. It's the node you reach for when your generated video is done but silent - Google's own video models can produce audio natively now, but for everything else, this is the missing soundtrack.

    What it is

    A thin wrapper around Vertex AI's lyria-002 music model. The default prompt is already a good one ("an epic, cinematic soundtrack with a full orchestra, soaring strings, and dramatic percussion"), which tells you the intended use: cinematic scoring, ambient beds, sound design sketches. You describe genre, instrumentation, mood, and tempo, and Lyria composes something that broadly fits. It's not a song-with-vocals generator - it's instrumental music synthesis - and it's a preview-class model, so quality varies with how well your prompt matches what it can do.

    How it works

    Unlike most nodes in this pack, Lyria doesn't use the google-genai client. It calls Vertex AI's prediction endpoint directly (aiplatform.gapic.PredictionServiceClient against a regional endpoint) with the prompt, sampleCount, and seed. The response comes back as base64-encoded WAV audio, which the node decodes, writes to a temp file, loads with torchaudio, and returns as a {waveform, sample_rate} dict - the standard ComfyUI AUDIO output. Wire it into SaveAudio or VHS's audio playback to actually hear it.

    Inputs that matter

    • prompt - the only creative input. Be specific: instruments, mood, tempo, intensity.
    • sample_count - 1 to 4 variants per call.
    • seed - reproducibility.
    • output_gcs_bucket - optional but worth understanding: set a GCS bucket name and the audio is also uploaded there, which is your durable copy if you don't want to dig it out of ComfyUI's temp folder.

    Output is one AUDIO tensor.

    Installing

    It rides along with the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/khanhlvg/vertex-ai-comfyui-nodes.git
    cd vertex-ai-comfyui-nodes
    pip install -r requirements.txt
    

    Then the standard Vertex AI setup - gcloud auth application-default login, GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION (defaults us-central1), and a billing-enabled project with the Vertex AI API enabled. The google-cloud-aiplatform dependency in the requirements file is what this node actually runs on.

    Where people get burned

    • Nothing plays. Same trap as the Chirp node: AUDIO output needs a downstream audio node. Add SaveAudio or VHS and you'll hear it.
    • It's slow-ish and paid. Each generation is a billable API call and takes a bit to come back. Sample-count and seed are your friends - generate a few, pick one, don't spam.
    • Vocal prompts disappoint. Lyria is instrumental-focused; describe it as "a track with vocals" and expectations need adjusting. For a narrated video, you're better off pairing Veo's native audio or Chirp TTS with a Lyria bed.
    • Preview model. lyria-002 may shift under you. Keep the prompt generic enough that a model change doesn't break the workflow.

    The honest pitch: this is the least essential node in the pack, but it's the one that makes finished videos feel finished. A Veo clip plus a Lyria bed plus a Chirp voiceover is a complete short film pipeline that never leaves ComfyUI.

    CategoryVertex AI

    Inputs (6)

    NameTypeDefaultDescription
    project_idSTRING
    locationSTRINGus-central1
    promptSTRINGAn epic, cinematic soundtrack with a full orchestra, soaring strings, and dramatic percussion.
    output_gcs_bucketoptSTRING
    sample_countoptINT11–4
    seedoptINT34189842590–4294967295

    Outputs (1)

    NameTypeDescription
    AUDIOAUDIO