ComfyUI > Nodes > comfyui-google-genmedia-custom-nodes > Lyria 2 Text To Music

ComfyUI Node: Lyria 2 Text To Music

Class Name

Lyria2TextToMusicNode

Category
Google AI/Lyria2
Author
gushob21 (Account age: 4888days)
Extension
comfyui-google-genmedia-custom-nodes
Latest Updated
2026-02-21
Github Stars
0.04K

How to Install comfyui-google-genmedia-custom-nodes

Install this extension via the ComfyUI Manager by searching for comfyui-google-genmedia-custom-nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-google-genmedia-custom-nodes in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Lyria 2 Text To Music Description

Transforms text prompts into music using Google Lyria 2 API for AI-driven audio synthesis.

Lyria 2 Text To Music:

The Lyria2TextToMusicNode is a powerful tool designed to transform textual prompts into musical compositions using the Google Lyria 2 API. This node is particularly beneficial for AI artists and creators who wish to explore the intersection of language and music, allowing them to generate unique audio pieces based on descriptive text inputs. By leveraging advanced AI capabilities, the node interprets the nuances of the provided text to create music that aligns with the intended mood or theme. This functionality opens up new creative possibilities, enabling users to produce personalized soundtracks or experimental audio content without requiring extensive musical expertise. The node's primary goal is to facilitate seamless music generation from text, making it an essential component for projects that integrate AI-driven audio synthesis.

Lyria 2 Text To Music Input Parameters:

prompt

The prompt parameter is a crucial input that serves as the textual foundation for music generation. It is a string that describes the desired characteristics or themes of the music you wish to create. The prompt should be clear and descriptive to guide the AI effectively. There is no explicit minimum or maximum length for the prompt, but it should be substantial enough to convey the intended musical direction. This parameter directly influences the style, mood, and elements of the generated music, making it essential for achieving the desired output.

negative_prompt

The negative_prompt is an optional parameter that allows you to specify elements or themes that should be avoided in the music generation process. It is also a string and can be used to refine the output by steering the AI away from certain musical characteristics. This parameter is particularly useful when you want to exclude specific genres, instruments, or moods from the generated music. Like the prompt, it should be clear and concise to effectively guide the AI.

sample_count

The sample_count parameter determines the number of music samples to generate. It is an integer value with a minimum of 1 and a maximum defined by the constant LYRIA2_MAX_SAMPLES. The default value is typically 1, but you can increase it to explore multiple variations of the generated music. However, if a specific seed is used, the sample_count must be set to 1 to ensure reproducibility.

seed

The seed parameter is an optional integer that allows for reproducible music generation. By setting a specific seed value, you can ensure that the same input parameters will consistently produce the same musical output. This is useful for experiments or projects where consistency is required. If the seed is greater than 0, the sample_count is automatically set to 1 to maintain reproducibility.

Lyria 2 Text To Music Output Parameters:

audio

The audio output parameter is a tuple containing a dictionary with the audio waveform and sample rate. This output represents the generated music based on the provided text prompt and other input parameters. The audio waveform is the actual sound data, while the sample rate indicates the number of samples per second, which affects the quality and fidelity of the audio. This output is essential for listening to, analyzing, or further processing the generated music.

Lyria 2 Text To Music Usage Tips:

  • Ensure your prompt is detailed and descriptive to guide the AI effectively in generating music that aligns with your vision.
  • Use the negative_prompt to exclude unwanted elements from the music, refining the output to better match your creative goals.
  • Experiment with different sample_count values to explore a variety of musical interpretations from the same prompt, but remember to set it to 1 if using a specific seed.
  • Utilize the seed parameter for reproducible results, especially when you need consistent outputs for iterative projects or comparisons.

Lyria 2 Text To Music Common Errors and Solutions:

Input Error: Prompt cannot be empty.

  • Explanation: This error occurs when the prompt parameter is empty or not a valid string.
  • Solution: Ensure that you provide a non-empty, valid string for the prompt parameter to guide the music generation process.

Configuration Error: Cannot use a specific 'seed' and 'sample_count' > 1 in the same request.

  • Explanation: This error arises when both a specific seed and a sample_count greater than 1 are used simultaneously.
  • Solution: Set the sample_count to 1 when using a specific seed to ensure reproducibility of the generated music.

Configuration Error: sample_count must be between 1 and LYRIA2_MAX_SAMPLES.

  • Explanation: This error indicates that the sample_count value is outside the allowed range.
  • Solution: Adjust the sample_count to be within the valid range, ensuring it is at least 1 and does not exceed LYRIA2_MAX_SAMPLES.

API Error: Lyria API failed to generate any audio files.

  • Explanation: This error occurs when the Lyria 2 API is unable to produce any audio output.
  • Solution: Verify that all input parameters are correctly set and try again. If the issue persists, check for any connectivity or API service issues.

Lyria 2 Text To Music Related Nodes

Go back to the extension to check out more related nodes.
comfyui-google-genmedia-custom-nodes
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Lyria 2 Text To Music