Skip to content

Add LEGO mode: generate instrument stems over a backing track#20

Closed
Copilot wants to merge 1 commit intolego-modefrom
copilot/add-lego-mode-support-again
Closed

Add LEGO mode: generate instrument stems over a backing track#20
Copilot wants to merge 1 commit intolego-modefrom
copilot/add-lego-mode-support-again

Conversation

Copy link

Copilot AI commented Mar 10, 2026

Adds --lego <track> to dit-vae, enabling ACE-Step's LEGO pipeline: given a source audio file (--src-audio), generate a new instrument stem conditioned on it. Requires the base model (acestep-v15-base); turbo/SFT don't support it.

Changes

  • tools/dit-vae.cpp--lego <track> flag; constructs a "Generate the {track} track based on the audio context:" instruction injected into the DiT alongside --src-audio. Validates that --src-audio is present when --lego is used.
  • tools/ace-qwen3.cpp — simplify phase-2 batch generation: replace dynamic compaction with a fixed N-batch forward (cond + uncond as 2*N), full CFG over all V_eff logits, mask the 24-token gap between EOS and audio codes with -1e9.
  • examples/lego.json — preset (audio_cover_strength=1.0, inference_steps=50, guidance_scale=7.0).
  • examples/lego.sh — self-contained 3-step pipeline: download base model → generate source track → apply lego.
  • README.md — usage docs and available track name reference.
  • .github/workflows/ci-build.yml — exclude ./mp3 and ./vendor from clang-format scan.

Usage

./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


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add LEGO mode support to project Add LEGO mode: generate instrument stems over a backing track Mar 10, 2026
@lmangani lmangani changed the base branch from master to lego-mode March 10, 2026 13:06
@lmangani lmangani marked this pull request as ready for review March 10, 2026 13:06
@lmangani lmangani closed this Mar 10, 2026
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.

2 participants