# Source: https://docs.comfy.org/tutorials/partner-nodes/stability-ai/stable-audio.md

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Stability AI Stable Audio 2.5 API Node ComfyUI Official workflow example

> This article will introduce how to use Stability AI Stable Audio 2.5 Partner node's text-to-audio, audio-to-audio and audio-inpainting capabilities in ComfyUI

The Stability AI Stable Audio 2.5 Partner node allows you to use Stability AI's latest audio generation model to create high-quality music through text prompts, audio transformations, and audio inpainting capabilities.

Stable Audio 2.5 is designed for enterprise use, featuring improved musical structure, better prompt adherence, and the ability to generate minutes-long compositions in seconds. The model offers three main workflows: **Text-to-Audio** for generating music from descriptions, **Audio-to-Audio** for transforming existing audio into new compositions, and **Audio Inpainting** for completing or extending existing tracks.

Trained exclusively on licensed audio, Stable Audio 2.5 is commercially safe and perfect for advertisers, game studios, and content creators who need professional-quality audio generation with enterprise-grade reliability.

<Tip>
  To use the API nodes, you need to ensure that you are logged in properly and using a permitted network environment. Please refer to the [API Nodes Overview](/tutorials/partner-nodes/overview) section of the documentation to understand the specific requirements for using the API nodes.
</Tip>

<Tip>
  <Tabs>
    <Tab title="Portable or self deployed users">
      Make sure your ComfyUI is updated.

      * [Download ComfyUI](https://www.comfy.org/download)
      * [Update Guide](/installation/update_comfyui)

      Workflows in this guide can be found in the [Workflow Templates](/interface/features/template).
      If you can't find them in the template, your ComfyUI may be outdated. (Desktop version's update will delay sometime)

      If nodes are missing when loading a workflow, possible reasons:

      1. You are not using the latest ComfyUI version (Nightly version)
      2. Some nodes failed to import at startup
    </Tab>

    <Tab title="Desktop or Cloud users">
      * The Desktop is base on ComfyUI stable release, it will auto-update when there is a new Desktop stable release available.
      * [Cloud](https://cloud.comfy.org) will update after ComfyUI stable release.

      So, if you find any core node missing in this document, it might be because the new core nodes have not yet been released in the latest stable version. Please wait for the next stable release.
    </Tab>
  </Tabs>
</Tip>

## Text-to-Audio Workflow

For text-to-audio, you can generate audio through text prompts. You need to describe the music you want to generate.

<a className="prose" target="_blank" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/templates/api_stability_ai_text_to_audio.json" style={{ display: 'inline-block', backgroundColor: '#0078D6', color: '#ffffff', padding: '10px 20px', borderRadius: '8px', borderColor: "transparent", textDecoration: 'none', fontWeight: 'bold'}}>
  <p className="prose" style={{ margin: 0, fontSize: "0.8rem" }}>Download JSON Workflow</p>
</a>

<img src="https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_text_to_audio.jpg?fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=7e369b21bd7a974f40ed38bcbc4c8afe" alt="workflow" data-og-width="2170" width="2170" data-og-height="1130" height="1130" data-path="images/tutorial/api_nodes/stability_ai/api_stability_ai_text_to_audio.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_text_to_audio.jpg?w=280&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=f933d31a488d96c95c717ae3630f1cbe 280w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_text_to_audio.jpg?w=560&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=f7fed196827182261976aea32e522c2a 560w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_text_to_audio.jpg?w=840&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=078a21a78fabbe870444a21d12a003ae 840w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_text_to_audio.jpg?w=1100&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=6eccc85d2feab74797b7e9d3fb16f42d 1100w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_text_to_audio.jpg?w=1650&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=4dd0da78dd4a6efe6f7a0ff3117dce60 1650w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_text_to_audio.jpg?w=2500&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=a9b327a847b32dbe99750e9bf217baf2 2500w" />

1. Modify the text prompt. You should use keywords to describe the music you want to generate.
2. (Optional) Modify the `duration` parameter. It's `190` by default.
3. Click the `Run` button or use the shortcut `Ctrl(cmd) + Enter` to execute the audio generation. The audio will be saved to the `ComfyUI/output/audio` directory.

## Audio-to-Audio Workflow

Audio-to-audio is basically music re-sampling. You can use it to generate new music from a given piece of music, or you can just hum a melody, and then the model will generate new music based on the input audio.

<a className="prose" target="_blank" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/templates/api_stability_ai_audio_to_audio.json" style={{ display: 'inline-block', backgroundColor: '#0078D6', color: '#ffffff', padding: '10px 20px', borderRadius: '8px', borderColor: "transparent", textDecoration: 'none', fontWeight: 'bold'}}>
  <p className="prose" style={{ margin: 0, fontSize: "0.8rem" }}>Download JSON Workflow</p>
</a>

<a className="prose" target="_blank" href="https://raw.githubusercontent.com/Comfy-Org/example_workflows/refs/heads/main/api_nodes/stability_ai/stable_audio/beatbox.mp3" style={{ display: 'inline-block', backgroundColor: '#0078D6', color: '#ffffff', padding: '10px 20px', borderRadius: '8px', borderColor: "transparent", textDecoration: 'none', fontWeight: 'bold'}}>
  <p className="prose" style={{ margin: 0, fontSize: "0.8rem" }}>Download Input  Audio</p>
</a>

<img src="https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_to_audio.jpg?fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=e3fb5f33fd60d42d65544874a574a483" alt="workflow" data-og-width="2366" width="2366" data-og-height="890" height="890" data-path="images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_to_audio.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_to_audio.jpg?w=280&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=0986fd5d755ae5a1dd16d1c918d83cf4 280w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_to_audio.jpg?w=560&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=5edbd9254f46138721015beea5669b2d 560w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_to_audio.jpg?w=840&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=957beac2b40d48517c68396b8dcdfa72 840w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_to_audio.jpg?w=1100&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=00b8997207fae2c4aa18c7e86de428a2 1100w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_to_audio.jpg?w=1650&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=de12e64a619cebb83ea44e55928bfe27 1650w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_to_audio.jpg?w=2500&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=147ead09b14ab884e5fbafc851e0b129 2500w" />

1. In this workflow, we have provided two nodes for you to input the audio（at least 6 seconds） you want to edit:
   * 1.1 `Record Audio` node: You can use it to record any of your music ideas, such as a hummed melody. It should be at least 6 seconds.
   * 1.2 `LoadAudio` node: You can use it to upload audio that you want to be used in this workflow.
2. Modify the text prompt. You should use keywords to describe the music you want to generate.
3. The `strength` parameter is used to control the difference from the original audio. The lower the value, the more similar the generated audio will be to the original audio.
4. Click the `Run` button or use the shortcut `Ctrl(cmd) + Enter` to execute the audio generation. The audio will be saved to the `ComfyUI/output/audio` directory.

## Audio Inpainting Workflow

Audio inpainting is used to complete or extend existing tracks. You can use it to complete the missing part of music or extend the music to a longer duration.

You need to set where you want to start and end the inpainting.

<a className="prose" target="_blank" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/refs/heads/main/templates/api_stability_ai_audio_inpaint.json" style={{ display: 'inline-block', backgroundColor: '#0078D6', color: '#ffffff', padding: '10px 20px', borderRadius: '8px', borderColor: "transparent", textDecoration: 'none', fontWeight: 'bold'}}>
  <p className="prose" style={{ margin: 0, fontSize: "0.8rem" }}>Download JSON Workflow</p>
</a>

<a className="prose" target="_blank" href="https://raw.githubusercontent.com/Comfy-Org/example_workflows/refs/heads/main/api_nodes/stability_ai/stable_audio/audio_input.wav" style={{ display: 'inline-block', backgroundColor: '#0078D6', color: '#ffffff', padding: '10px 20px', borderRadius: '8px', borderColor: "transparent", textDecoration: 'none', fontWeight: 'bold'}}>
  <p className="prose" style={{ margin: 0, fontSize: "0.8rem" }}>Download Input  Audio</p>
</a>

<img src="https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_inpaint.jpg?fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=733ebe929fe884c94701a36e38549c58" alt="workflow" data-og-width="2358" width="2358" data-og-height="848" height="848" data-path="images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_inpaint.jpg" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_inpaint.jpg?w=280&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=b1e3d149cbf62cab22b311663b54da1e 280w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_inpaint.jpg?w=560&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=01606a6efb0c05c8ec39917c2f03afd6 560w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_inpaint.jpg?w=840&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=2dc4160b3619080eaa29e0a576e2aeb5 840w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_inpaint.jpg?w=1100&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=dd812ab64f8939469a5226e14faf3fa9 1100w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_inpaint.jpg?w=1650&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=ad241c5858411f087968e400833197a7 1650w, https://mintcdn.com/dripart/odc_rZSmR0RrwUYs/images/tutorial/api_nodes/stability_ai/api_stability_ai_audio_inpaint.jpg?w=2500&fit=max&auto=format&n=odc_rZSmR0RrwUYs&q=85&s=6f851ac856dced5b14f7236112e9eb08 2500w" />

1. Upload audio to the `LoadAudio` node.
2. Modify the text prompt. You should use keywords to describe the music you want to generate.
3. (Optional) Modify the `duration` parameter. It's `190` by default.
4. (Important) Modify the `mask_start` and `mask_end` parameters. You need to set where you want to start and end the inpainting.
5. Click the `Run` button or use the shortcut `Ctrl(cmd) + Enter` to execute the audio generation. The audio will be saved to the `ComfyUI/output/audio` directory.