Local music generation
Last updated
Local music generation speed and hardware: how to read RTF correctly
Compare music-generation speed with matched models and timing scopes
Waiting for a finished music file may include model loading, audio generation, decoding1, and saving. Check which stages a public benchmark measured and the actual output duration, then compare RTF2 and real-time speed using consistent definitions.
Suppose you are making a 30-second instrumental synth-pop loop for a video. Songs with lyrics and sound effects follow different inputs and generation paths, so this comparison focuses on runtimes that can produce the same kind of instrumental. For a new file, record first loading, generation after warm-up, and save completion separately to see where the wait occurs.
Calculate RTF from output duration and generation time
RTF (real-time factor) is wall-clock generation time divided by the actual playback duration of the output audio. Generating 60 seconds of audio in 30 seconds gives RTF 0.5, or twice real-time. Taking 120 seconds gives RTF 2, slower than playback. Some repositories call the reciprocal, such as ‘34×’, RTF; check the definition and recalculate from seconds when needed.
Use the playback duration shown in the file immediately after generation as the denominator—not the prompt3 asking for 30 seconds. If you trim the start or end in an editor, record original generation duration and editing time separately. Listening for a smooth loop boundary matters, but that judgment is distinct from a timing measurement.
Time music generation with matched settings
Tokens4 or generation steps per second alone do not show how long it takes to finish a song. Match the prompt, target length, sampling settings, and output duration, then record model loading and generation time separately.
The ACE-Step 1.5 and YuE 2 measurements apply to the devices and settings listed on their respective pages. ACE-Step 1.5 · YuE
Read public speed figures with version, device, and scope
The table below pairs speed figures from official repositories and model cards with their execution conditions. Check the version, device, and measured stage to find results close to your setup. The table marks conditions that were not published.
Scroll sideways to compare all columns.
| Model and source | Device and runtime | Published figures | Unspecified conditions |
|---|---|---|---|
| Earlier ACE-Step version | RTX 4090 and MacBook M2 Max; repository script | 27 steps: 4090 34.48× (1-minute render in 1.74 s), M2 Max 2.27× (26.43 s). 60 steps: 4090 15.63× (3.84 s), M2 Max 1.03× (58.25 s) | Model/commit, sample, batch, prompt, warm-up, and run variance unspecified |
| ACE-Step 1.5 | README claim: A100 ‘full song’ <2 s (some 0.5–10 s), RTX 3090 <10 s; CUDA/MPS/CPU profiler and macOS MLX documentation | Profiler measures duration, batch, thinking, steps, and planning/DiT/VAE/save/total time; no reproducible device-by-device table published | Song duration, checkpoint, cold/warm status, definition, and variance unspecified |
| YuE2-3B HF pipeline | Linux, Python 3.10+, 24 GB BF16 NVIDIA GPU; PyTorch 2.10, Transformers 4.57.6, CUDA graphs/FlashAttention, BF16 AR/NAR + FP32 VAE, unquantized | RTX 4090: full 71.04 s/214.85 s, melody 68.68/214.67 s, off 57.91/196.88 s (32 runs after setup). H800 full 54.74/224.96 s (one run) | One-GPU results, one candidate per call; initial path exploration and saving excluded |
| YuE2-Turbo | RTX 5090 32GB, warm; PyTorch 2.10/CUDA 12.8/vLLM 0.19/BF16 | Single-request RTF 0.290→0.173 (1.68×); concurrent four-request system RTF 0.317→0.096 (3.31× throughput). Claims same YuE2 weights and 32 flow steps | Self-reported README tests: 3 songs × 3 runs for one request; 4 requests × 3 waves concurrently. Not original YuE2 or 4090 results |
| HeartMuLa-oss-3B | CUDA baseline with device selection and lazy-load example | Only RTF ≈ 1.0 stated | Device, duration, sample, cold/warm status, and Apple path unspecified |
| Stable Audio Open 1.0 | Card examples use CUDA or CPU PyTorch; no MPS/MLX table | Up to 47 s, 44.1 kHz stereo; tools example 100 steps/30 s, diffusers example 200 steps/10 s | Examples are not speed tests; GPU, timing, warm-up, and end-to-end scope unspecified |
| MusicGen / AudioCraft | GPU-focused guidance; about 16 GB recommended for medium. No official Apple MLX path | 300M/1.5B/3.3B models; no device-specific timing table | GPU, output duration, steps/tokens, decoding scope, and cold/warm status unspecified |
Separate total waiting from stage-level bottlenecks
Music generation may include lyric or text planning, audio-token or diffusion generation, vocoder/VAE decoding, and file saving or conversion. End-to-end time is the total wait experienced by the app user; stage times diagnose bottlenecks. The ACE-Step 1.5 profiler records LLM5 planning, DiT6 diffusion, VAE decoding7, saving, and total wall-clock time separately.
A slow completion time does not prove GPU8 computation is the only cause. Stage records show whether planning, audio generation, decoding, or saving is delayed and help select the right remedy. If profiler stages overlap, do not simply add their times and call that the total.

RTX 4090 measurements in the YuE2-3B card
The model card specifies Linux/Python 3.10+ and a 24 GB BF169 NVIDIA path. Its HF setup uses PyTorch10 2.10, Transformers 4.57.6, CUDA graphs11/FlashAttention, BF16 AR/NAR12 with FP3213 VAE14, and no quantization15. The generation times below average 32 runs after setup; H800 full is one run. They time a synchronized pipeline16 call and exclude initial path exploration and saving. GPU memory is the full-run peak measured by NVML.
Scroll sideways to compare all columns.
| Device and mode | Audio duration | Generation time | RTF | Peak GPU memory |
|---|---|---|---|---|
| RTX 4090 · full | 214.85 s | 71.04 s | 0.331 | 11.18 GiB |
| RTX 4090 · melody | 214.67 s | 68.68 s | 0.320 | 11.02 GiB |
| RTX 4090 · off | 196.88 s | 57.91 s | 0.294 | 11.09 GiB |
| H800 · full (one run) | 224.96 s | 54.74 s | 0.243 | 10.34 GiB |
Reproduce a repeatable test on your hardware
Hold prompts and lyrics, output duration, sample rate17, channels, and quality settings constant. Record checkpoint18, code version, backend, precision, steps, operating system, driver, and framework versions. Separate the first run from repeated runs after warm-up, and note the median and range. Include failures, OOMs, and truncated outputs.
For short outputs, fixed costs such as planning and loading may dominate; for longer ones, DiT or audio-token generation may dominate. Larger batches can improve throughput19 without reducing single-song latency. Record faster results from reduced settings separately from the original configuration.

Test on devices with a verified runtime path
CUDA20, Apple MPS, and MLX21 are not interchangeable labels; each project must implement the backend. ACE-Step 1.5 documents CUDA/MPS and vLLM, PyTorch, and MLX paths for its LLM. YuE2 specifies Linux and a 24 GB BF16 NVIDIA GPU as its baseline; HeartMuLa examples use CUDA by default. Unified memory22 in a Mac or the RTX 5090 specification alone cannot establish compatibility or throughput on an unsupported backend.
Confirm that your operating system and device appear in the model's official runtime23 path, then generate a short test file to completion. Record actual duration and total wait. Consider changing hardware only if repeated generation disrupts the editing workflow, using supported backends and measured bottlenecks as evidence.

Terminology notes
Token decoding — The stage that generates successive output tokens using the input and the response produced so far.
Back to the textReal-Time Factor — Generation time divided by the duration of the output. Under comparable conditions, a lower value indicates faster generation.
Back to the textPrompt — The input text sent to a model. For generative models it describes the desired result and strongly shapes the output.
Back to the textToken — A unit into which a model divides input or output for processing.
Back to the textLarge language model — A model trained on large text datasets to learn language patterns and process or generate text in context.
Back to the textDiT — Short for Diffusion Transformer: a model architecture that uses a transformer to refine noisy representations across diffusion steps.
Back to the textImage and audio decoding — The stage that reconstructs image pixels or playable audio from a compressed internal representation.
Back to the textGPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.
Back to the textBF16 — A 16-bit floating-point format for model values. Its exponent has the same width as FP32, giving it a similarly wide value range.
Back to the textPyTorch — A software framework for building and running AI models. Check the compatible PyTorch version and hardware support along with the model.
Back to the textCUDA Graphs — A CUDA feature that records and reuses a sequence of GPU operations. It can reduce submission overhead.
Back to the textAR / NAR — AR (autoregressive) generation proceeds in order, conditioned on prior outputs. NAR (non-autoregressive) generation is less sequential.
Back to the textFP32 — A 32-bit floating-point format. It uses more memory per value than BF16 and can represent values more precisely.
Back to the textVAE — Short for Variational Autoencoder. It can encode input into a compact latent representation or decode that representation into an output.
Back to the textQuantization — A way to represent model weights or values with fewer bits, reducing storage and memory use. The coarser representation can also affect accuracy.
Back to the textPipeline — A sequence of processing stages from input to output. Different models or tools may be used at each stage.
Back to the textSampling rate — The number of times per second an audio signal is measured when digitized.
Back to the textCheckpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.
Back to the textThroughput — The amount of work processed or generated over time. Comparisons need the unit, such as tokens per second or requests per second.
Back to the textCUDA — A software platform for general-purpose computing on NVIDIA GPUs.
Back to the textMLX — Apple’s machine-learning framework, which runs models using memory shared by the CPU and GPU on Apple Silicon.
Back to the textUnified memory — An architecture where the CPU and GPU share one physical memory pool.
Back to the textRuntime — The software environment that provides facilities needed while a program runs. In local AI, it can also refer to a model execution engine.
Back to the text
Frequently asked questions
- What should you check first in this article?
- Waiting for a finished music file may include model loading, audio generation, decoding, and saving. Check which stages a public benchmark measured and the actual output duration, then compare RTF and real-time speed using consistent definitions.
- How much memory does it need?
- The model card specifies Linux/Python 3.10+ and a 24 GB BF16 NVIDIA path. Its HF setup uses PyTorch 2.10, Transformers 4.57.6, CUDA graphs/FlashAttention, BF16 AR/NAR with FP32 VAE, and no quantization. The generation times below average 32 runs after setup; H800 full is one run. They time a synchronized pipeline call and exclude initial path exploration and saving. GPU memory is the full-run peak measured by NVML.
- When is it better not to choose this?
- A slow completion time does not prove GPU computation is the only cause. Stage records show whether planning, audio generation, decoding, or saving is delayed and help select the right remedy. If profiler stages overlap, do not simply add their times and call that the total.
- Where can you check the conditions and sources?
- The table below pairs speed figures from official repositories and model cards with their execution conditions. Check the version, device, and measured stage to find results close to your setup. The table marks conditions that were not published.
Read next
Local music generation
Local AI music generation: make songs and background music on your computer
Local music generation
YuE2 local music generation: make vocal songs and arrangements from lyrics
Local music generation
Run ACE-Step 1.5 locally: setup through your first song
Local music generation
Compare local music models for songs, instrumentals and sound effects
