Engineering

How We Made AI Beatmap Generation Fast Enough to Feel Interactive

A full osu! mania mapset in about 20 seconds of GPU time instead of a minute or more: where the time goes in a ManiaGAI request, and the decisions — from the browser to batched difficulties — that took it out.

A generator you wait minutes for is a batch job. You submit a song, go do something else, and come back to whatever it made — and if you don’t like it, trying a different style or a different set of difficulties costs you another wait. A generator that answers in seconds is a tool: you try, listen, adjust and try again.

That difference is why, for ManiaGAI version 2, we treated latency as a design constraint across the whole system rather than something to optimise at the end. Version 1 took a minute or more for a mapset. Version 2 takes about 20 seconds of GPU time for a full mapset on a typical song — usually 13 to 25 seconds, depending on the song and the difficulties requested. Here is where that time goes, and the decisions that took the rest out.

Anatomy of a request

  1. Your browser
  2. Timing ∥ music features
  3. Planner
  4. Noter
  5. Validation
  6. Download

One measured production run from the v2 launch: a 2:50 song, 5 difficulties, on an NVIDIA T4 GPU — 12.7 seconds in total.

Stage timings of one ManiaGAI v2 generation
StageTime
Timing + music features (run concurrently)3.8 s
Planning (all difficulties)1.0 s
Note generation (all 5 difficulties)6.1 s
Whole run12.7 s

GPU compute time for one song on the v2 launch system (October 1, 2026), not counting upload, queueing or download.

1. Do the audio work before anyone presses Create

Every uploaded song has to be decoded, loudness-normalised and re-encoded into one consistent format before the models can use it. On a server that is a few seconds of work the GPU would otherwise wait for. In ManiaGAI it happens in your browser, as soon as you pick the file — while you are still choosing a key count and difficulties. By the time you press Create, the work is usually done. If preparing the song on a slow device takes longer than 20 seconds, the server takes over instead, so the optimisation never holds anyone up.

2. Run timing and music understanding side by side

Two things have to be known about the song before planning starts: its timing grid (from the open-source Beat This model plus our own grid fitting) and its musical features (from the MERT music model). They don’t depend on each other, so they don’t wait for each other: the GPU runs Beat This and MERT while the grid fitting runs on the CPU at the same time. In the run above, the whole understanding stage took 3.8 seconds.

3. Generate every difficulty in one pass

A ManiaGAI mapset has up to ten difficulties. Generating them one after another would multiply the time by the number of difficulties. Instead, every requested difficulty is planned and generated together, in one batched GPU pass — they share the same song and the same musical features, and only the targets differ. That is how five difficulties of note generation fit in 6.1 seconds in the run above.

4. Refine the whole chart instead of writing it note by note

The note model is non-autoregressive: it produces the whole chart in a fixed number of refinement passes, instead of one token at a time from the start of the song to the end — so the number of model steps is fixed, however many notes the chart ends up with. (Why the model works this way is its own story: the Planner + Noter article.)

5. Start from a snapshot, not from scratch

Generation runs on serverless GPU workers, which means a worker isn’t always running when a request arrives. Loading the models and warming everything up from nothing would add many seconds to that first request. Instead, workers are restored from a memory snapshot taken after everything is loaded and warmed up, so a fresh worker is ready in about a second rather than spending that time loading models.

6. Don’t wait at the finish line

The last steps used to add their own delay. Now the downloadable .osz is put together the moment the charts are ready, and a finished map is saved to My Charts the instant generation ends — even if you have left the page. Progress on the generator reports the real stage each generation is in, so a wait is never a mystery.

Faster again, with identical charts

On October 8, 2026 we shipped a faster implementation of the generation system: maps now generate about twice as fast, and the charts are exactly the same — same input, same output. We made it a hard rule for that change: a speed-up that alters what the model writes is a model change, and has to be judged as one. Only the wait got shorter.

What speed buys

Speed changes how ManiaGAI gets used. It makes trying a second style or a different set of difficulties a matter of seconds, makes a preview-then-download flow natural, and makes it possible to keep a free tier running. It is also why we optimise for the whole request — from the browser to the download — rather than for the model alone: players feel the wait, not the GPU time.

For where these stages sit in the system, see the Technology page; for what changed when, the changelog.