Skip to content

Fix acestep-cpp model path resolution and cover mode spawn pipeline#7

Merged
lmangani merged 2 commits intomainfrom
copilot/fix-model-path-issues
Mar 7, 2026
Merged

Fix acestep-cpp model path resolution and cover mode spawn pipeline#7
lmangani merged 2 commits intomainfrom
copilot/fix-model-path-issues

Conversation

Copy link
Contributor

Copilot AI commented Mar 7, 2026

MODELS_DIR=./models (and sibling relative paths) from .env were resolved against the server's CWD (<repo>/server/) instead of the project root, causing all model lookups to return empty strings and every generation to fail with LM model not found — run models.sh first even when models were present. Cover/audio-to-audio mode also incorrectly ran ace-qwen3 before dit-vae, despite dit-vae deriving audio codes from the source audio directly.

Path resolution (server/src/config/index.ts)

Added resolveFromRoot(p) — resolves relative paths against the absolute APP_ROOT (from __dirname) instead of leaving them as raw strings for Node's CWD to misinterpret. Applied to all nine path env vars:

MODELS_DIR, DATABASE_PATH, AUDIO_DIR,
ACE_QWEN3_BIN, DIT_VAE_BIN,
ACESTEP_MODEL, LM_MODEL, TEXT_ENCODER_MODEL, VAE_MODEL

Cover mode (server/src/services/acestep.ts)

  • useSpawnMode(params?) — cover/passthrough jobs (sourceAudioUrl or audioCodes) now only require ditVaeBin; lmBin is only required when the LM step is actually needed (text-to-music)
  • runViaSpawn — skip ace-qwen3 when sourceAudioUrl is set; request.json is passed directly to dit-vae (same pattern as existing audioCodes passthrough)
  • runViaSpawnaudio_cover_strength added to the spawn-mode request JSON
  • processGeneration — passes params to useSpawnMode() so cover-mode jobs enter spawn mode when only ditVaeBin is available

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix command calls and model paths for system Fix acestep-cpp model path resolution and cover mode spawn pipeline Mar 7, 2026
@lmangani lmangani marked this pull request as ready for review March 7, 2026 16:47
@lmangani lmangani merged commit 1f44a42 into main Mar 7, 2026
4 checks passed
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