acestep-cpp-comfyui
ComfyUI custom nodes that wrap acestep.cpp — a portable C++17 implementation of ACE-Step 1.5 music generation using GGML. Text + lyrics in, stereo 48 kHz audio out. Runs on CPU, CUDA, Metal, and Vulkan.
Features
- Build the
ace-lm and ace-synth binaries from source via the Acestep.cpp Builder node (no terminal required)
- Download the required GGUF models directly from HuggingFace without leaving ComfyUI
- Load the four GGUF model files required by acestep.cpp (LM, text encoder, DiT, VAE)
- Load LoRA adapters from a dedicated Acestep.cpp LoRA Loader node
- Configure advanced technical options via the Acestep.cpp Options node (output format, VAE tiling, batch size, debug flags)
- Generate music from a caption and optional lyrics/metadata
- Full control over generation parameters (turbo and SFT presets)
- Cover mode, repaint mode, lego mode, and LoRA adapter support
- All generation parameters aligned with the acestep.cpp request JSON reference
- Connect AUDIO tensors from any
LoadAudio node directly to the generator for source audio
- Returns a ComfyUI AUDIO tensor, compatible with any audio preview or save node
- Ready-to-use example workflows in
workflow-examples/
Prerequisites
git and cmake must be on your system PATH before using the Builder node (or the manual build below). Everything else is handled inside ComfyUI.
# Debian/Ubuntu
apt install git cmake build-essential
# macOS (Homebrew)
brew install cmake
1 – Build acestep.cpp
Option A – Acestep.cpp Builder node (recommended)
After installing this custom node package, drop the Acestep.cpp Builder node onto your canvas and click Queue. It will:
- Clone
https://github.com/audiohacking/acestep.cpp into <node_dir>/acestep.cpp
- Run
git submodule update --init --recursive
- Configure with CMake (auto-detecting CUDA → Metal → CPU)
- Build
ace-lm and ace-synth using all available CPU cores
The binaries land in <node_dir>/acestep.cpp/build/, which is where the Generate node looks first — no extra config needed.
Option B – Command line
Clone acestep.cpp inside the node directory so the Generate node finds the binaries automatically — no configuration required:
cd ComfyUI/custom_nodes/acestep-cpp-comfyui
git clone https://github.com/audiohacking/acestep.cpp
cd acestep.cpp
git submodule update --init
mkdir build && cd build
# Linux (NVIDIA GPU)
cmake .. -DGGML_CUDA=ON
# macOS (Metal auto-enabled)
cmake ..
# CPU with OpenBLAS
cmake .. -DGGML_BLAS=ON
cmake --build . --config Release -j$(nproc)
This produces ace-lm and ace-synth in <node_dir>/acestep.cpp/build/, which is where the Generate node already looks — no extra config needed.
2 – Download GGUF models
Option A – Acestep.cpp Model Downloader node (recommended)
After installing this custom node package, use the Acestep.cpp Model Downloader node inside ComfyUI. It downloads the required GGUFs from Serveurperso/ACE-Step-1.5-GGUF straight into your model folder. huggingface_hub must be available:
pip install huggingface_hub
Option B – Command line
pip install huggingface_hub[cli] # installs the 'hf' CLI tool
./models.sh # Q8_0 turbo essentials (~7.7 GB)
Pre-quantized GGUFs are available on Hugging Face.
Default models (placed in models/):
| GGUF |
Role |
Size |
acestep-5Hz-lm-4B-Q8_0.gguf |
LM (ace-lm) |
4.2 GB |
Qwen3-Embedding-0.6B-Q8_0.gguf |
Text encoder |
748 MB |
acestep-v15-turbo-Q8_0.gguf |
DiT |
2.4 GB |
vae-BF16.gguf |
VAE |
322 MB |
Installation
Fresh install
cd ComfyUI/custom_nodes
git clone https://github.com/audiohacking/acestep-cpp-comfyui
Restart ComfyUI. On startup the node will attempt to build the ace-lm and ace-synth binaries automatically if git and cmake are available. If the automatic build does not complete, use the Acestep.cpp Builder node inside ComfyUI — no manual file editing required.
Updating an existing installation
cd ComfyUI/custom_nodes/acestep-cpp-comfyui
git pull
Then restart ComfyUI so it picks up the new node code.
After updating: if your existing workflows show validation errors such as
"Failed to convert an input value to a INT/FLOAT value", the workflow was
saved with an older version of the node. Simply delete the Generate node
from the canvas, re-add it from the node list, and re-connect its inputs —
this resets the widget values to the current defaults and clears any stale
empty-string placeholders.
Advanced Configuration
config.json is optional and only needed if you store binaries or models in non-standard locations.
Copy config.example.json to config.json in the node directory and set only the keys you need:
{
"model_folders": [
"/custom/path/to/models"
],
"binary_paths": {
"ace-lm": "/custom/path/to/build/ace-lm",
"ace-synth": "/custom/path/to/build/ace-synth"
}
}
model_folders – additional directories to scan for .gguf files, merged with ComfyUI's built-in text_encoders folder.
binary_paths – override the automatic binary search. The node already looks in your system PATH and <node_dir>/acestep.cpp/build/, so this is only needed for custom build locations.
Example Workflows
Ready-to-use workflow JSON files are in the workflow-examples/ directory. Drag one onto the ComfyUI canvas or load it via Load workflow.
| File |
Description |
acestep-cpp-text2music.json |
Basic text-to-music generation |
acestep-cpp-lora.json |
Text-to-music with a LoRA adapter |
acestep-cpp-reference-audio.json |
Cover mode using a source audio file |
acestep-cpp-cover.json |
Cover/remix mode using a source audio file |
Prerequisites: download the GGUF models (use the Model Downloader node) and build the binaries (use the Builder node) before running a generation workflow.
Node Reference
Acestep.cpp Builder
Clones audiohacking/acestep.cpp from GitHub and builds the ace-lm and ace-synth binaries using CMake. Requires git and cmake on the system PATH.
Inputs (required)
| Name |
Default |
Description |
clone_dir |
<node_dir>/acestep.cpp |
Directory to clone the repo into |
backend |
auto |
CMake backend: auto (detects CUDA → Metal → CPU), cuda, metal, blas, cpu |
Inputs (optional)
| Name |
Default |
Description |
force_rebuild |
false |
Remove the existing build/ directory and rebuild from scratch |
Outputs
| Name |
Type |
Description |
build_log |
STRING |
Full cmake configure + build output |
Tip: Run this node once to compile the binaries. The default clone_dir places them where the Generate node already searches, so no further configuration is needed.
Acestep.cpp Model Downloader
Downloads the required ACE-Step GGUF files from Serveurperso/ACE-Step-1.5-GGUF on HuggingFace into a local directory. Quant availability per model type mirrors the logic in models.sh.
Inputs (required)
| Name |
Default |
Description |
save_dir |
ComfyUI text_encoders folder |
Directory to save downloaded GGUF files |
lm_size |
4B |
LM model size: 4B, 1.7B, or 0.6B |
quant |
Q8_0 |
Quantisation level (falls back to nearest valid quant for each model type) |
dit_variant |
turbo |
DiT variant: turbo, sft, base, turbo-shift1, turbo-shift3, turbo-continuous |
Inputs (optional)
| Name |
Default |
Description |
hf_token |
(empty) |
HuggingFace access token (not needed for public repos) |
overwrite |
false |
Re-download even if the file already exists |
Outputs
| Name |
Type |
Description |
downloaded_files |
STRING |
Summary of files downloaded / skipped |
Tip: Run this node once to populate your model folder, then bypass/disable it and connect the Model Loader node to the same save_dir.
Acestep.cpp Model Loader
Selects the four GGUF model files and validates that they exist on disk.
Inputs (required)
| Name |
Description |
lm_model |
LM GGUF (e.g. acestep-5Hz-lm-4B-Q8_0.gguf) |
text_encoder_model |
Text-encoder GGUF (e.g. Qwen3-Embedding-0.6B-Q8_0.gguf) |
dit_model |
DiT GGUF (e.g. acestep-v15-turbo-Q8_0.gguf) |
vae_model |
VAE GGUF (e.g. vae-BF16.gguf) |
Outputs
| Name |
Type |
Description |
models |
ACESTEP_MODELS |
Model path bundle passed to the generator |
Acestep.cpp LoRA Loader
Specify a LoRA adapter file and scale, ready to connect to the Generate node.
Enter the full path to any .safetensors file or PEFT directory anywhere on your filesystem.
Inputs (required)
| Name |
Description |
lora_path |
Full filesystem path to the LoRA adapter file (.gguf or .safetensors) |
lora_scale |
Adapter scale (default 1.0) |
Outputs
| Name |
Type |
Description |
lora |
ACESTEP_LORA |
LoRA bundle passed to the generator |
Acestep.cpp Options
Configures advanced technical parameters for generation. Connect to the Generate node's options input. All fields are optional — unset fields fall back to acestep.cpp defaults.
Inputs (all optional)
| Name |
Default |
Description |
output_format |
mp3 |
Output audio format: mp3 (smaller) or wav (lossless) |
mp3_bitrate |
128 |
MP3 bitrate in kbps (only used when output_format is mp3) |
vae_chunk |
256 |
VAE latent frames per tile — reduce to lower VRAM usage |
vae_overlap |
64 |
VAE overlap frames per side |
lm_batch |
1 |
Number of LM sequences to generate in parallel (each produces a different song) |
dit_batch |
1 |
Number of DiT variations per LM output (max 9, differ only in noise) |
no_flash_attn |
false |
Disable flash attention in both ace-lm and ace-synth |
lm_max_seq |
8192 |
KV cache size for ace-lm in tokens |
lm_no_fsm |
false |
Disable FSM constrained decoding in ace-lm |
Outputs
| Name |
Type |
Description |
options |
ACESTEP_OPTIONS |
Options bundle passed to the generator |
Acestep.cpp Generate
Runs ace-lm