Files
ACE-Step/inference.ipynb
T

4.9 KiB

Open In Colab

ACE-Step Inference

StepFun Logo

A Step Towards Music Generation Foundation Model

Credits:

🖥️ Hardware Performance

We have evaluated ACE-Step across different hardware setups, yielding the following throughput results:

Device RTF (27 steps) Time to render 1 min audio (27 steps) RTF (60 steps) Time to render 1 min audio (60 steps)
NVIDIA RTX 4090 34.48 × 1.74 s 15.63 × 3.84 s
NVIDIA A100 27.27 × 2.20 s 12.27 × 4.89 s
NVIDIA RTX 3090 12.76 × 4.70 s 6.48 × 9.26 s
MacBook M2 Max 2.27 × 26.43 s 1.03 × 58.25 s

We use RTF (Real-Time Factor) to measure the performance of ACE-Step. Higher values indicate faster generation speed. 27.27x means to generate 1 minute of music, it takes 2.2 seconds (60/27.27). The performance is measured on a single GPU with batch size 1 and 27 steps.

In [ ]:
#@title Install and Download


import codecs



print("Installing...")
!sudo apt update > /dev/null 2>&1
!sudo apt install python3.10 > /dev/null 2>&1
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 > /dev/null 2>&1
!sudo update-alternatives --set python3 /usr/bin/python3.10 > /dev/null 2>&1
!curl -sS https://bootstrap.pypa.io/get-pip.py | python3 > /dev/null 2>&1
import sys
sys.path.append('/usr/local/lib/python3.10/dist-packages')


repopath = codecs.decode('erdhverzragf.gkg', 'rot_13')


!git clone https://github.com/ace-step/ACE-Step
%cd /content/ACE-Step


!pip install uv pyngrok > /dev/null 2>&1
!uv pip install -r {repopath} > /dev/null 2>&1
!uv pip install huggingface-hub numpy==1.26.0 > /dev/null 2>&1
!huggingface-cli download ACE-Step/ACE-Step-v1-3.5B --local-dir /content/ACE-Step/checkpoints --local-dir-use-symlinks False


import os
os.environ['MPLBACKEND'] = 'agg'
In [ ]:
#@title Run Gradio UI
bf16 = True # @param {"type":"boolean"}


print(" * Running UI...")

!pip install e .!acestep --checkpoint_path ./checkpoints/ --port 7865 --device_id 0 --share true --bf16 {bf16}