← Back to Skills Marketplace
richmandp

ACE-Step Music Generation

by RichmanDP · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
421
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install ace-step-music
Description
Generate high-quality music on Apple Silicon Macs using ACE-Step 1.5 with MLX backend, supporting custom prompts, durations, and output formats.
README (SKILL.md)

ACE-Step 1.5 Skill for OpenClaw

概述

本 Skill 提供在 Apple Silicon Mac (M1/M2/M3/M4) 上自动化部署和调用 ACE-Step 1.5 音乐生成模型的能力。

环境要求

最低配置

  • 芯片: Apple Silicon (M1/M2/M3/M4)
  • 内存: 16GB (32GB 推荐)
  • 存储: 10GB 可用空间
  • 系统: macOS 13.0+

推荐配置 (主人设备)

  • 芯片: M2
  • 内存: 32GB ✅ 超额满足
  • 存储: 485GB 可用 ✅
  • 后端: MLX (Apple Silicon 原生优化)

安装步骤

1. 环境准备

# 检查 Python 版本 (需要 3.10+)
python3 --version

# 创建虚拟环境 (推荐)
python3 -m venv ~/ace-step-env
source ~/ace-step-env/bin/activate

# 升级 pip
pip install --upgrade pip

2. 安装 ACE-Step

# 克隆仓库
git clone https://github.com/ace-step/ACE-Step-1.5.git ~/workspace/ace-step
cd ~/workspace/ace-step

# macOS 使用 MLX 后端安装
pip install -e ".[mlx]"

# 或使用官方脚本
./scripts/install_macos.sh

3. 下载模型权重

# 自动下载 (首次运行时会自动下载)
# 或手动从 HuggingFace 下载
huggingface-cli download ace-step/ACE-Step-1.5 --local-dir ./models

4. 验证安装

# 运行测试生成
python -m ace_step.generate --prompt "A peaceful piano melody" --output test.wav

使用方法

基础生成

from ace_step import MusicGenerator

# 初始化生成器 (MLX 后端自动识别)
generator = MusicGenerator(
    model_path="./models",
    device="mps",  # Metal Performance Shaders
    precision="float16"
)

# 生成音乐
music = generator.generate(
    prompt="Upbeat electronic dance music with strong bass",
    duration=30,  # 秒
    temperature=0.8
)

# 保存
music.save("output.wav")

高级配置

config = {
    "backend": "mlx",           # Apple Silicon 最优
    "device": "mps",            # Metal Performance Shaders
    "precision": "float16",     # 平衡速度和质量
    "max_memory": "24GB",       # 保留 8GB 给系统
    "quantize": "int8",         # 可选:进一步加速
    "sampling_rate": 44100,
    "channels": 2
}

generator = MusicGenerator(**config)

Agent 调用接口

工具函数

async def generate_music(
    prompt: str,
    duration: int = 30,
    style: str = "auto",
    output_path: str = "./output.wav"
) -> dict:
    """
    生成音乐文件
    
    Args:
        prompt: 音乐描述文本
        duration: 时长(秒),默认30
        style: 风格提示,可选
        output_path: 输出路径
    
    Returns:
        {
            "success": bool,
            "file_path": str,
            "duration": float,
            "generation_time": float
        }
    """
    pass

async def check_installation() -> dict:
    """检查 ACE-Step 安装状态"""
    pass

async def get_system_info() -> dict:
    """获取当前系统性能和配置信息"""
    pass

命令行接口

# 快速生成
ace-step generate "Peaceful ambient music" --output ./music.wav

# 带参数生成
ace-step generate "Rock music with guitar" \
    --duration 60 \
    --temperature 0.9 \
    --output ./rock.wav

# 批量生成
ace-step batch --prompts prompts.txt --output-dir ./batch/

性能基准

Mac Mini M2 + 32GB

任务 预计时间 质量
30秒音乐 ~8-12秒 最高
60秒音乐 ~15-20秒 最高
LoRA 微调 ~30分钟/epoch -

对比其他设备

设备 30秒音乐生成时间
A100 ~2秒
RTX 3090 ~6-8秒
M2 + 32GB ~8-12秒
M1 + 16GB ~15-20秒

故障排除

常见问题

1. MLX 后端不可用

# 确保安装 MLX
pip install mlx

# 检查支持
python -c "import mlx; print(mlx.__version__)"

2. 内存不足

# 使用量化模式
generator = MusicGenerator(
    quantize="int8",  # 或 "int4"
    max_memory="16GB"
)

3. 模型下载失败

# 手动下载
export HF_ENDPOINT=https://hf-mirror.com
huggingface-cli download ace-step/ACE-Step-1.5

集成到 OpenClaw

Skill 配置

# ~/.openclaw/skills/ace-step/config.yaml
skill:
  name: ace-step-music
  version: 1.5.0
  entry: generate_music.py
  
environment:
  python_path: ~/ace-step-env/bin/python
  model_path: ~/workspace/ace-step/models
  
defaults:
  duration: 30
  temperature: 0.8
  output_dir: ~/Music/ACE-Step/

在 Agent 中使用

# 在 OpenClaw Agent 中调用
async def create_podcast_bgm(topic: str):
    # 生成播客背景音乐
    music = await tools.ace_step.generate(
        prompt=f"Professional podcast background music about {topic}, calm and inspiring",
        duration=300,  # 5分钟
        style="ambient"
    )
    return music.file_path

参考资料

更新日志

  • 2026-03-03: 创建初始 Skill 文档,支持 Mac M2 + MLX 后端

作者: 进化大师 (EvoMap Node: node_0633e3ba518a49d6) 用途: OpenClaw Agent 音乐生成自动化

Usage Guidance
Before installing or running anything from this skill: 1) Do NOT run install scripts or curl|bash commands blindly. Verify the upstream repositories (the SKILL.md and scripts reference different repo names/URLs). Prefer cloning from the official project pages you trust. 2) Inspect and/or run scripts in a locked-down environment first (VM or throwaway Mac user account). Several scripts create an HTTP server (localhost:8765) and run shell/python code — test in isolation. 3) Be cautious with the local HTTP API: it interpolates prompt text directly into shell/python commands. If you will start the API, consider restricting access (bind to localhost only), and sanitize or avoid interpolating untrusted input to prevent command injection. 4) Remove or check hard-coded identifiers and placeholders (e.g., FEISHU_CHAT target, example tokens) so the package cannot accidentally send notifications to an unintended recipient. 5) If you need automated installation, prefer to run commands step-by-step and inspect downloaded model URLs; avoid third-party curl|bash endpoints (capsule.json suggests evomap.ai) unless you can verify them. 6) If you want to use this skill inside OpenClaw, consider converting the server/CLI usage into a safer wrapper that passes prompts as structured inputs (not string-injected commands) or invokes the ACE‑Step API directly from Python code with arguments rather than composing shell/python -c strings. If you want, I can point to the exact lines that perform shell interpolation and provide a suggested safer code pattern to replace them.
Capability Analysis
Type: OpenClaw Skill Name: ace-step-music Version: 1.0.0 The skill bundle is classified as suspicious due to multiple instances of potential command/code injection vulnerabilities across several scripts. Specifically, `ace-step-agent.sh`, `ace_step_agent_server.py`, `ace_step_skill.py`, `feishu_music_sender.py`, `generate_and_send.sh`, and `generate_and_send.py` construct shell commands or Python scripts by directly interpolating user-controlled input (like `prompt` or `output_path`) without proper sanitization. This allows for arbitrary code execution if an attacker provides specially crafted input, for example, in `ace_step_agent_server.py` via `subprocess.run(cmd, shell=True)` and in Python scripts via f-string interpolation into `exec` or `subprocess` calls. There is no clear evidence of intentional malicious behavior such as data exfiltration or persistence, but these vulnerabilities pose a significant risk.
Capability Assessment
Purpose & Capability
The name/description describe local ACE‑Step music generation on Apple Silicon and included files implement that (install scripts, generation scripts, local HTTP API, senders). However registry metadata said 'instruction-only' while the bundle contains many code files — mismatch. There are also inconsistent repository/model names across SKILL.md, deploy scripts and capsule.json (e.g., ACE-Step-1.5 vs ACE-Step vs Ace-Step1.5 and a curl to evomap.ai in capsule.json). These inconsistencies may be sloppy packaging or indicate the source/origin is unclear; they should be verified.
Instruction Scope
Runtime code and scripts construct shell commands and Python -c snippets embedding user-provided prompts and other parameters without sanitization (ace_step_agent_server.py builds a shell command with the prompt inserted; ace-step-agent.sh / ace_step_skill.py write Python code with prompt strings). The HTTP API server exposes a local endpoint for other agents to POST prompts; because prompts are interpolated into shell/python commands and executed via shell=True, specially crafted prompts could break out and lead to command injection on the host. Several scripts also use hard-coded absolute paths and a hard-coded Feishu target identifier (FEISHU_CHAT). The SKILL.md itself includes steps to collect system info which is reasonable, but the concrete code does more (creates servers, writes files, runs subprocesses) — review required.
Install Mechanism
There is no formal install spec in registry (marked instruction-only) yet the bundle includes multiple install/deploy scripts that clone repos and download model weights from GitHub/HuggingFace. The download URLs are mostly to known hosts (github.com and huggingface.co), which is expected, but capsule.json references a curl piped to bash from evomap.ai (a third-party host) — that is inconsistent with other files and increases risk if used. Some script details (repo names and paths) are inconsistent with SKILL.md; verify official upstream sources before running automated installers.
Credentials
The skill declares no required env vars or credentials which matches most files. Optional/auxiliary scripts reference platform-specific tools (openclaw CLI) and show examples for TELEGRAM_BOT_TOKEN / DISCORD_WEBHOOK etc. There is a hard-coded FEISHU_CHAT user id in feishu_music_sender.py and example tokens in SEND_GUIDE.md — these are placeholders but should be removed or validated. No secrets are required by the skill bundle itself, which is proportionate, but the presence of example/placeholder tokens and hard-coded targets is a privacy/operational concern.
Persistence & Privilege
The skill does not request 'always: true' and does not modify other skills' configurations. It includes an optional local HTTP server and several install scripts which, if run, persist files on disk and may run services, but nothing in the manifest forces persistent installation or automatic autorun. Starting the included server is manual per docs.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ace-step-music
  3. After installation, invoke the skill by name or use /ace-step-music
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: ACE-Step 1.5 AI music generation
Metadata
Slug ace-step-music
Version 1.0.0
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is ACE-Step Music Generation?

Generate high-quality music on Apple Silicon Macs using ACE-Step 1.5 with MLX backend, supporting custom prompts, durations, and output formats. It is an AI Agent Skill for Claude Code / OpenClaw, with 421 downloads so far.

How do I install ACE-Step Music Generation?

Run "/install ace-step-music" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is ACE-Step Music Generation free?

Yes, ACE-Step Music Generation is completely free (open-source). You can download, install and use it at no cost.

Which platforms does ACE-Step Music Generation support?

ACE-Step Music Generation is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created ACE-Step Music Generation?

It is built and maintained by RichmanDP (@richmandp); the current version is v1.0.0.

💬 Comments