Songs
Kiln has two song models, each through its own engine: ACE-Step 1.5 (kiln-acestep, through acestep.cpp) and
YuE2 (kiln-yue2, through yue2.cpp). Both take the engine’s own JSON request and return 48 kHz stereo Audio.
The request formats are the engines’ own, so their READMEs are the full reference: acestep.cpp and yue2.cpp.
ACE-Step 1.5
Section titled “ACE-Step 1.5”ACE-Step is four models working together: a 5 Hz language model that plans the song (metadata, lyrics and audio codes), a text encoder, a DiT that generates the audio, and a VAE that decodes it.
hf download Serveurperso/ACE-Step-1.5-GGUF acestep-5Hz-lm-4B-Q8_0.gguf Qwen3-Embedding-0.6B-Q8_0.gguf \ acestep-v15-turbo-Q8_0.gguf vae-BF16.ggufimport org.liberationdata.kiln.HfCache;import org.liberationdata.kiln.acestep.AceStepModel;
import java.io.File;
String repo = "Serveurperso/ACE-Step-1.5-GGUF";String lm = HfCache.require(repo, "acestep-5Hz-lm-4B-Q8_0.gguf").toString();String textEncoder = HfCache.require(repo, "Qwen3-Embedding-0.6B-Q8_0.gguf").toString();String dit = HfCache.require(repo, "acestep-v15-turbo-Q8_0.gguf").toString();String vae = HfCache.require(repo, "vae-BF16.gguf").toString();
String request = """ {"caption": "modern country rock, male baritone vocal with a southern twang, telecaster, driving drums", "lyrics": "[Verse 1]\\nRusty rolled in on a Tuesday night\\n\\n[Chorus]\\nHe's a machine with a honky-tonk heart\\n", "bpm": 96, "duration": 60, "keyscale": "G major", "timesignature": "4", "vocal_language": "en", "seed": 11, "lm_seed": 11, "inference_steps": 8, "guidance_scale": 1.0, "shift": 3.0}""";
try (var songs = new AceStepModel(lm, textEncoder, dit, vae, true)) { AceStepModel.Result r = songs.generate(request); r.audio().writeWav(new File("song.wav")); System.out.println(r.resolvedRequestJson()); // the request after the LM filled in what it decided}resolvedRequestJson is the request as the engine ran it, after the language model filled in metadata, lyrics and
seeds. Save it beside the song to make it again.
Choices
Section titled “Choices”- Without the language model. Pass
nullas the first argument. The caption and lyrics then drive the DiT directly, which is faster and uses less memory;./gradlew singleworks this way. - A smaller or larger planner. The LM comes in 4B, 1.7B and 0.6B (
acestep-5Hz-lm-1.7B-Q8_0.gguf, …). - Another DiT.
acestep-v15-turbotakes 8 steps. The XL turbo DiT (acestep-v15-xl-turbo-Q8_0.gguf) is larger;sfttakes about 50 steps. keepLoaded.truekeeps every part resident between calls.falsekeeps at most one part on the GPU at a time, loading each as it is needed: slower, but it leaves memory for other models in the same JVM.
On the Radeon 8060S with Vulkan, the turbo DiT made a 60 s song in about 15 s, and XL turbo a 3 min 20 s song in 57 s.
If decoding hangs or loses the GPU on a power-limited machine (a laptop on battery, say), see
KILN_ACESTEP_VAE_CHUNK.
YuE2 writes an ABC-notation score first, a plan of the song in plain text, then the audio from it. The score comes
back with the song, and yue2.cpp can take an edited one back in its request (as abc).
hf download Serveurperso/YuE2-GGUF YuE2-3B-Q8_0.gguf YuE2-Vae-F32.ggufimport org.liberationdata.kiln.yue2.Yue2Model;
import java.nio.file.Files;import java.nio.file.Path;
String repo = "Serveurperso/YuE2-GGUF";String request = """ {"style": "modern country rock, male baritone lead vocal, overdriven electric guitars, mid-tempo stomp", "lyrics": "[Verse 1]\\nRusty rolled in on a Tuesday night\\n\\n[Chorus]\\nHe's a machine with a honky-tonk heart\\n", "duration": 60, "seed": 1, "lm_seed": 1}""";
try (var yue = new Yue2Model(HfCache.require(repo, "YuE2-3B-Q8_0.gguf").toString(), HfCache.require(repo, "YuE2-Vae-F32.gguf").toString(), true, 0)) { Yue2Model.Result r = yue.generate(request); r.audio().writeWav(new File("yue2-song.wav")); if (r.abcScore() != null) Files.writeString(Path.of("yue2-song.abc"), r.abcScore());}The last two constructor arguments are keepLoaded, as for ACE-Step, and maxSeq, the model’s context in tokens
(0 is its full 24,576). The result has the audio, the resolved request and the ABC score. On the 8060S, YuE2 3B
(Q8_0) made a 60 s song in about 60 s.
Try it
Section titled “Try it”./gradlew song --args='song.wav' # ACE-Step, with the 4B LM and the turbo DiT./gradlew song --args='song.wav my-request.json' -Pdit=xl-turbo -Plm=1.7B./gradlew song --args='song.wav' -Plm=none # without the LM./gradlew yue2 --args='yue2-song.wav'./gradlew single # an LLM writes the lyrics, ACE-Step sings themThe examples’ requests are in kiln-examples/src/main/resources/requests/. Each writes the resolved request next to
the .wav, and the YuE2 example writes the score too.