> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-zh/yin-yue-sheng-cheng/ace-step.md).

# ACE-Step 音乐生成

使用 ACE-Step 生成带人声的完整歌曲——<4GB VRAM 上的开源 Suno 替代方案

ACE-Step 1.5 是人人都在等待的开源音乐生成突破。它可以生成 **带有人声和乐器的完整歌曲** 来自文本提示词，可与 Suno 等商业服务相媲美——但能在本地的 GPU 上运行，且只需 **MIT 许可证**. 其杀手级功能是什么？它只需要 **少于 4GB 的显存**，让它成为有史以来最易用的 AI 音乐工具。在 RTX 4090 上可在 2–8 秒内生成一首完整曲目。

## 主要特性

* **完整歌曲生成**：人声 + 乐器 + 音效，一次完成
* **< 4GB 显存**：即使最便宜的 GPU 也能运行（RTX 3060，甚至 GTX 1060！）
* **每首曲目 2–8 秒**：在现代 GPU 上几乎瞬间生成
* **MIT 许可证**：可完全用于商业用途，无任何限制
* **歌词支持**：可按主歌/副歌结构编写自己的歌词
* **风格控制**：曲风标签、情绪、速度、编配
* **ComfyUI 集成**：用于复杂音乐流水线的基于节点工作流

## 需求

| 组件     | 最低             | 推荐           |
| ------ | -------------- | ------------ |
| GPU    | 任何配备 4GB 显存的设备 | RTX 3060 或更高 |
| 显存     | 4GB            | 6GB 以上       |
| 内存     | 8GB            | 16GB         |
| 磁盘     | 10GB           | 15GB         |
| Python | 3.10+          | 3.11         |

**推荐的 Clore.ai GPU**：RTX 3060 6GB（$0.03–0.07/小时）——没错，最便宜的 GPU 也能用！

### 速度参考

| GPU           | 生成时间（30 秒曲目） |
| ------------- | ------------ |
| GTX 1060 6GB  | 约 15–20 秒    |
| RTX 3060 12GB | 约 6–10 秒     |
| RTX 3080 10GB | 约 4–6 秒      |
| RTX 4090 24GB | 约 2–3 秒      |

## 安装

### 独立模式

```bash
git clone https://github.com/ace-step/ACE-Step.git
cd ACE-Step
pip install -e .

# 或通过 pip（如果可用）
pip install ace-step
```

### ComfyUI 集成

```bash
cd ComfyUI/custom_nodes
git clone https://github.com/ace-step/ComfyUI-ACE-Step
pip install -r ComfyUI-ACE-Step/requirements.txt
# 重启 ComfyUI — ACE-Step 节点将会出现
```

## 快速开始

### 安装

ACE-Step 是一个 Gradio 网页应用——不是 pip 包。请从 Git 安装：

```bash
# 克隆并设置
git clone https://github.com/ACE-Step/ACE-Step-1.5.git
cd ACE-Step-1.5

# 选项 A：uv（推荐）
pip install uv
uv sync

# 选项 B：pip
pip install -r requirements.txt
```

### 启动 Web UI

```bash
# 启动 Gradio 界面
python app.py --port 7860 --share

# 适用于低显存（< 6GB）：
python app.py --port 7860 --half
```

打开 `http://localhost:7860` 在浏览器中打开。界面包含：

1. **提示词输入框** — 描述风格："欢快电子流行，120 BPM"
2. **歌词输入框** — 用以下标签编写段落： `[Verse]`, `[Chorus]` 标签
3. **时长滑块** — 15–120 秒
4. **生成按钮** — 点击并等待 2–8 秒

### 使用歌词生成（Web UI）

在歌词输入框中输入：

```
[Verse 1]
我在深夜租用 GPU
服务器嗡嗡作响，屏幕如此明亮
训练模型，追逐梦想
一切从来都不像表面看起来那样

[Chorus]
我们今天正在打造一些新东西
未来只差一个提示词的距离
每一个 token，每一行
代码与音乐交织在一起
```

将提示词设为： `独立摇滚叙事曲，原声吉他，情感丰富，男声`

### CLI / 管道用法

```bash
# 使用管道脚本直接从命令行生成
cd ACE-Step-1.5
python acestep/acestep_v15_pipeline.py \
  --prompt "低保真嘻哈, 轻松, 雨天, 钢琴, 柔和鼓点" \
  --lyrics "" \
  --duration 30 \
  --output output.wav
```

### ComfyUI 集成（批量工作流）

```bash
# 安装用于批量生成的 ComfyUI 节点
cd ComfyUI/custom_nodes
git clone https://github.com/ACE-Step/ComfyUI-ACE-Step
pip install -r ComfyUI-ACE-Step/requirements.txt
# 重启 ComfyUI — ACE-Step 节点会出现在节点菜单中
```

ComfyUI 节点让你可以在可视化工作流中，用不同的提示词批量生成多首曲目。

### 风格标签

使用风格标签控制生成：

```python
# 曲风标签
“流行”、“摇滚”、“电子”、“嘻哈”、“爵士”、“古典”、“金属”、
“低保真”、“合成浪潮”、“氛围”、“民谣”、“R&B”、“乡村”

# 情绪标签
“快乐”、“悲伤”、“有活力”、“轻松”、“黑暗”、“史诗感”、“浪漫”

# 乐器标签
“钢琴”、“吉他”、“鼓”、“贝斯”、“合成器”、“弦乐”、“小提琴”

# 人声标签
“男声”、“女声”、“合唱”、“无人声”、“哼唱”

# 技术标签
“120 BPM”、“小调”、“大调”、“4/4 拍”
```

## Web UI

```bash
cd ACE-Step
python app.py --port 7860
# 打开 http://localhost:7860
```

网页 UI 提供：

* 带风格预设的文本提示词输入
* 带有主歌/副歌格式的歌词编辑器
* 时长和质量滑块
* 实时波形预览
* 下载为 WAV 或 MP3

## Clore.ai 上的使用场景

| 使用场景      | 配置                 | 成本            |
| --------- | ------------------ | ------------- |
| 视频背景音乐    | RTX 3060，批量生成      | $0.03–0.07/小时 |
| 歌曲原型 / 演示 | RTX 3080，实时生成      | $0.05–0.19/小时 |
| 音乐制作流水线   | RTX 4090 + ComfyUI | $0.14–0.42/小时 |
| 播客片头/片尾   | 任何 GPU，一次生成        | $0.03–0.07/小时 |

## 给 Clore.ai 用户的建议

* **可能的最低成本 AI 工作负载**：对于 RTX 3060，每小时 $0.03–0.07，就能用几分钱生成数百首曲目
* **通宵批量运行**：租用一块 GPU 8 小时（$0.05–0.1），生成 500+ 首曲目
* **用于流水线的 ComfyUI**：与图像生成串联，用于专辑封面工作流
* **导出质量**：以最高质量生成，然后在需要时在 DAW 中处理
* **风格混合**：在提示词中组合曲风："带黑胶噪音的低保真爵士嘻哈" 的效果出奇地好

## 故障排查

| 问题            | 解决方案                                                                                           |
| ------------- | ---------------------------------------------------------------------------------------------- |
| 未找到 CUDA      | 确保已安装支持 CUDA 的 PyTorch： `pip install torch --index-url https://download.pytorch.org/whl/cu128` |
| 模型下载缓慢        | 设置 `HF_HUB_ENABLE_HF_TRANSFER=1` 以获得更快下载速度                                                     |
| 音频听起来失真       | 尝试降低温度（0.7）或减少推理步数                                                                             |
| 4GB 显存不足      | 将时长缩短到 15 秒；升级到 6GB GPU                                                                        |
| 缺少 ComfyUI 节点 | 安装自定义节点后重启 ComfyUI                                                                             |

## ACE-Step 对比 Suno 与 AudioCraft

| 功能       | ACE-Step 1.5   | Suno v4 | AudioCraft     |
| -------- | -------------- | ------- | -------------- |
| 完整歌曲     | ✅              | ✅       | ❌（仅音乐）         |
| 人声       | ✅              | ✅       | ❌              |
| 本地/自托管   | ✅              | ❌（云端）   | ✅              |
| 许可证      | MIT            | 专有      | MIT            |
| 最低显存     | 4GB            | 不适用     | 16GB           |
| 速度（30 秒） | 2–8 秒          | 约 30 秒  | 约 60 秒         |
| 成本       | 约 $0.04/小时 GPU | $10/月订阅 | 约 $0.08/小时 GPU |

## 延伸阅读

* [GitHub 仓库](https://github.com/ace-step/ACE-Step)
* [ComfyUI 节点](https://github.com/ace-step/ComfyUI-ACE-Step)
* [AudioCraft 指南](/guides/guides_v2-zh/yin-pin-yu-yu-yin/audiocraft-music.md) — 仅适用于纯器乐音乐


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-zh/yin-yue-sheng-cheng/ace-step.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
