Skip to content

Add LEGO mode: generate instrumental stems over references#19

Merged
lmangani merged 11 commits intolego-modefrom
copilot/add-lego-mode-support
Mar 10, 2026
Merged

Add LEGO mode: generate instrumental stems over references#19
lmangani merged 11 commits intolego-modefrom
copilot/add-lego-mode-support

Conversation

Copy link

Copilot AI commented Mar 10, 2026

Implements ACE-Step LEGO mode in dit-vae: given a source audio file, generate a new instrument stem conditioned on it via --lego <track> + --src-audio. Requires the base model (acestep-v15-base); turbo/SFT do not support it.

  • tools/dit-vae.cpp--lego <track> flag; builds a "Generate the {track} track based on the audio context:" instruction injected into the DiT alongside --src-audio
  • examples/lego.json — request preset (audio_cover_strength=1.0, inference_steps=50, guidance_scale=7.0)
  • examples/lego.sh — end-to-end demo: download base model → generate source track → apply lego
  • README.md — usage docs and full track name reference
./build/dit-vae \
    --src-audio backing-track.wav \
    --lego guitar \
    --request examples/lego.json \
    --text-encoder models/Qwen3-Embedding-0.6B-Q8_0.gguf \
    --dit models/acestep-v15-base-Q8_0.gguf \
    --vae models/vae-BF16.gguf \
    --wav

Available tracks: vocals, backing_vocals, drums, bass, guitar, keyboard, percussion, strings, synth, fx, brass, woodwinds

… docs

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement LEGO mode support for acestep.cpp Add LEGO mode to dit-vae via --lego flag Mar 10, 2026
Copilot stopped work on behalf of lmangani due to an error March 10, 2026 11:22
…ate, lego)

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title Add LEGO mode to dit-vae via --lego flag examples/lego.sh: self-contained 3-step lego test pipeline Mar 10, 2026
…io_cover_strength only

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title examples/lego.sh: self-contained 3-step lego test pipeline Fix lego.json and README: strip request to minimal required fields Mar 10, 2026
Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title Fix lego.json and README: strip request to minimal required fields Fix lego mode: minimal request JSON and WAV output to prevent crash Mar 10, 2026
…t root

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title Fix lego mode: minimal request JSON and WAV output to prevent crash Fix lego mode: WAV output, base model parameters, and models.sh working directory Mar 10, 2026
@lmangani lmangani changed the title Fix lego mode: WAV output, base model parameters, and models.sh working directory WIP: Lego mode support Mar 10, 2026
…12% (#20)

* perf: improve batch generation in step 1 by 3-12%

* remove comments

* remove comments
Adds --lego <track> to dit-vae for ACE-Step lego mode, which generates a
new instrument stem layered over an existing source audio file.

- tools/dit-vae.cpp: --lego <track> CLI flag; passes instrument name into
  the DiT context alongside --src-audio; requires the base model
- examples/lego.json: request with caption, audio_cover_strength=1.0,
  inference_steps=50, guidance_scale=7.0 (base model settings)
- examples/lego.sh: self-contained 3-step pipeline (download base model
  from project root, generate source track, apply lego guitar); models.sh
  is always invoked from the project root via subshell (cd .. && ./models.sh)
- README.md: lego mode section with usage, available track names, and
  correct base-model parameters
- .github/workflows/ci-build.yml: exclude mp3/ from clang-format check

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title WIP: Lego mode support Add LEGO mode: generate instrument stems over a backing track Mar 10, 2026
Removed example JSON and bash commands from README.
@lmangani lmangani changed the title Add LEGO mode: generate instrument stems over a backing track Add LEGO mode: generate instrumental stems over references Mar 10, 2026
@lmangani lmangani marked this pull request as ready for review March 10, 2026 12:39
@lmangani lmangani changed the base branch from master to lego-mode March 10, 2026 13:10
@lmangani lmangani merged commit fc318db into lego-mode Mar 10, 2026
2 of 3 checks passed
lmangani added a commit that referenced this pull request Mar 10, 2026
* Add LEGO mode: generate instrumental stems over references (#19)

* Add LEGO mode: --lego <track> flag for dit-vae, example files, README docs

* Remove base model check from lego.sh

Removed the echo statement for ensuring the base model.

* Refactor lego.sh by removing echo statements

Removed echo statements for steps in the script.

* Implement error check for --lego with DiT model

Add error handling for --lego option requiring base DiT model

* Move lego mode from `--lego <track>` CLI flag to `"lego"` JSON request field (#21)

* apply requested changes

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
@lmangani lmangani deleted the copilot/add-lego-mode-support branch March 13, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants