Local music generation

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.

Requirements and key details
  • RTF is generation time divided by actual audio duration. RTF 0.5 is twice real-time; RTF 2 takes twice the audio duration to generate.
  • Stage timings differ from total waiting time; check whether loading, planning, synthesis, decoding, and saving are included.
  • YuE2 card results on RTX 4090 and H800, and public ACE-Step and YuE2-Turbo claims, use different test conditions.

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.

Official speed evidence and unspecified test conditions
Model and sourceDevice and runtimePublished figuresUnspecified conditions
Earlier ACE-Step versionRTX 4090 and MacBook M2 Max; repository script27 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.5README claim: A100 ‘full song’ <2 s (some 0.5–10 s), RTX 3090 <10 s; CUDA/MPS/CPU profiler and macOS MLX documentationProfiler measures duration, batch, thinking, steps, and planning/DiT/VAE/save/total time; no reproducible device-by-device table publishedSong duration, checkpoint, cold/warm status, definition, and variance unspecified
YuE2-3B HF pipelineLinux, Python 3.10+, 24 GB BF16 NVIDIA GPU; PyTorch 2.10, Transformers 4.57.6, CUDA graphs/FlashAttention, BF16 AR/NAR + FP32 VAE, unquantizedRTX 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-TurboRTX 5090 32GB, warm; PyTorch 2.10/CUDA 12.8/vLLM 0.19/BF16Single-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 stepsSelf-reported README tests: 3 songs × 3 runs for one request; 4 requests × 3 waves concurrently. Not original YuE2 or 4090 results
HeartMuLa-oss-3BCUDA baseline with device selection and lazy-load exampleOnly RTF ≈ 1.0 statedDevice, duration, sample, cold/warm status, and Apple path unspecified
Stable Audio Open 1.0Card examples use CUDA or CPU PyTorch; no MPS/MLX tableUp to 47 s, 44.1 kHz stereo; tools example 100 steps/30 s, diffusers example 200 steps/10 sExamples are not speed tests; GPU, timing, warm-up, and end-to-end scope unspecified
MusicGen / AudioCraftGPU-focused guidance; about 16 GB recommended for medium. No official Apple MLX path300M/1.5B/3.3B models; no device-specific timing tableGPU, 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.

Read YuE2 timing with song duration — YuE2-3B · RTX 4090 · mean of 32 warm requests
RTF is generation time divided by audio duration; lower is faster for the same duration. Initial load and saving are excluded.
A timeline splitting music generation into planning, audio synthesis, decoding, and saving
Total waiting may include several stages, from model setup through saving.

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.

Audio duration, generation time, and GPU peak in the YuE2-3B card
Device and modeAudio durationGeneration timeRTFPeak GPU memory
RTX 4090 · full214.85 s71.04 s0.33111.18 GiB
RTX 4090 · melody214.67 s68.68 s0.32011.02 GiB
RTX 4090 · off196.88 s57.91 s0.29411.09 GiB
H800 · full (one run)224.96 s54.74 s0.24310.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.

A desk with two audio waveforms on a laptop, headphones and a listening notebook
Listen separately to decide whether the result is the music you want.

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.

Cards for CUDA, MPS, and MLX runtime paths beside a laptop and graphics card
Check the model's supported backend before looking at device specifications.

Terminology notes

  1. Token decoding — The stage that generates successive output tokens using the input and the response produced so far.

    Back to the text
  2. Real-Time Factor — Generation time divided by the duration of the output. Under comparable conditions, a lower value indicates faster generation.

    Back to the text
  3. Prompt — The input text sent to a model. For generative models it describes the desired result and strongly shapes the output.

    Back to the text
  4. Token — A unit into which a model divides input or output for processing.

    Back to the text
  5. Large language model — A model trained on large text datasets to learn language patterns and process or generate text in context.

    Back to the text
  6. DiT — Short for Diffusion Transformer: a model architecture that uses a transformer to refine noisy representations across diffusion steps.

    Back to the text
  7. Image and audio decoding — The stage that reconstructs image pixels or playable audio from a compressed internal representation.

    Back to the text
  8. GPU — A processor designed to handle many calculations in parallel. It performs model computations during AI inference.

    Back to the text
  9. BF16 — 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 text
  10. PyTorch — A software framework for building and running AI models. Check the compatible PyTorch version and hardware support along with the model.

    Back to the text
  11. CUDA Graphs — A CUDA feature that records and reuses a sequence of GPU operations. It can reduce submission overhead.

    Back to the text
  12. AR / NAR — AR (autoregressive) generation proceeds in order, conditioned on prior outputs. NAR (non-autoregressive) generation is less sequential.

    Back to the text
  13. FP32 — A 32-bit floating-point format. It uses more memory per value than BF16 and can represent values more precisely.

    Back to the text
  14. VAE — Short for Variational Autoencoder. It can encode input into a compact latent representation or decode that representation into an output.

    Back to the text
  15. Quantization — 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 text
  16. Pipeline — A sequence of processing stages from input to output. Different models or tools may be used at each stage.

    Back to the text
  17. Sampling rate — The number of times per second an audio signal is measured when digitized.

    Back to the text
  18. Checkpoint — A file containing saved model weights and related state. Versions or tasks in one model family may use different checkpoints.

    Back to the text
  19. Throughput — 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 text
  20. CUDA — A software platform for general-purpose computing on NVIDIA GPUs.

    Back to the text
  21. MLX — Apple’s machine-learning framework, which runs models using memory shared by the CPU and GPU on Apple Silicon.

    Back to the text
  22. Unified memory — An architecture where the CPU and GPU share one physical memory pool.

    Back to the text
  23. Runtime — 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.