> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec-d5155ac.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Stable Audio 1.0 ComfyUI 工作流示例

> 在 ComfyUI 中使用 Stability AI 的开源 Stable Audio 1.0 模型进行文生音频生成的指南。

<Tip>
  <Tabs>
    <Tab title="本地用户">
      请确保你的 ComfyUI 已经更新。

      * [ComfyUI 下载](https://www.comfy.org/download)
      * [ComfyUI 更新教程](/zh/installation/update_comfyui)

      本指南里的工作流可以在[工作流模板](/zh/interface/features/template)中找到。如果找不到，可能是 ComfyUI 没有更新。

      如果加载工作流时有节点缺失，可能原因有：

      1. 你用的不是最新版（每夜版）。
      2. 启动时有些节点导入失败。
    </Tab>

    <Tab title="云端用户">
      * [Cloud](https://cloud.comfy.org) 会在 ComfyUI 稳定版本发布后更新。

      所以，如果你发现本文档中有任何核心节点缺失，可能是因为新核心节点尚未在最新稳定版中发布。请等待下一个稳定版发布。
    </Tab>
  </Tabs>
</Tip>

**Stable Audio 1.0** 是Stability AI推出的首个开源音频生成模型。它接收文本提示并生成音频片段。在ComfyUI中，其工作方式类似于标准文生音频管线：CLIP对提示进行编码，K采样器对Latent进行去噪，VAE将其解码为音频。

**相关链接**：

* [GitHub: Stability-AI/stable-audio-open-1.0](https://github.com/Stability-AI/stable-audio-open-1.0)

## 工作流

<h3 id="audio_stable_audio_example">
  Stable Audio 1.0：文本转音频
</h3>

使用 Stable Audio 根据文本提示生成音频。

<img src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/templates/audio_stable_audio_example-1.webp" alt="Stable Audio 1.0 文本转音频工作流预览" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=audio_stable_audio_example&utm_source=docs&utm_medium=referral&utm_campaign=stable-audio-1">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/audio_stable_audio_example.json">
    下载 JSON 或在模板库中搜索 "Stable Audio 1.0：文本转音频"
  </Card>
</CardGroup>

该工作流使用**标准 ComfyUI 节点**：无需自定义节点。它加载 Stable Audio 1.0 checkpoint，通过 CLIP 文本编码器（t5-base）编码你的提示，使用 K采样器对 Latent 音频进行 denoise，并通过模型的 VAE 将其解码为音频。

**使用方法**：

1. **加载 checkpoint**：`CheckpointLoaderSimple` 节点使用 `stable-audio-open-1.0.safetensors`
2. **编写提示**：在 `CLIPTextEncode` 节点中输入你的描述（例如 "heaven church electronic dance music"）
3. **设置时长**：调整 `EmptyLatentAudio` 节点的长度值（默认 47.6 秒）
4. 点击**运行**（`Ctrl/Cmd + Enter`）生成音频。音频将保存到 `ComfyUI/output/audio/`

## 模型下载

加载工作流时，ComfyUI 会提供所有缺失模型的下载链接。若要手动设置，请下载以下文件并放入正确的文件夹。

### 模型

<Card title="stable-audio-open-1.0.safetensors" icon="download" href="https://huggingface.co/StabilityAI/stable-audio-open-1.0/blob/main/stable-audio-open-1.0.safetensors">
  2.3GB。放入 models/checkpoints/ 目录下。
</Card>

将模型放入：

```
📂 ComfyUI/
├── 📂 models/
│   └── 📂 checkpoints/
│       └── stable-audio-open-1.0.safetensors
```

### 文本编码器

<Card title="t5-base.safetensors" icon="download" href="https://huggingface.co/Comfy-Org/t5-base/blob/main/t5-base.safetensors">
  用于提示词条件的文本编码器。放入 models/text\_encoders/ 目录下。
</Card>

将文本编码器放入：

```
📂 ComfyUI/
├── 📂 models/
│   └── 📂 text_encoders/
│       └── t5-base.safetensors
```

放置文件后，在 ComfyUI 中按 **R** 键刷新节点并加载最新模型。
