Skip to content

Wire repaint/cover mode controls across UI + simple mode source audio#11

Merged
lmangani merged 3 commits intomainfrom
copilot/add-repaint-model-autoswitch
Mar 8, 2026
Merged

Wire repaint/cover mode controls across UI + simple mode source audio#11
lmangani merged 3 commits intomainfrom
copilot/add-repaint-model-autoswitch

Conversation

Copy link
Contributor

Copilot AI commented Mar 7, 2026

acestep-cpp now supports both cover and repaint generation modes. This PR completes the UI wiring so all required controls are accessible in both simple and custom modes, with automatic SFT model handling for repaint.

Backend (server/src/services/acestep.ts)

  • runViaSpawn: writes repainting_start/repainting_end into request.json for repaint mode; skips audio_cover_strength (mask handles isolation)
  • processGeneration: validates repaint requires sourceAudioUrl, fails fast with a clear error otherwise

Frontend (components/CreatePanel.tsx)

Simple mode — new Source Audio card

Previously cover/repaint was only accessible in custom mode. A collapsible Cover / Repaint (optional) card now appears in simple mode with:

  • From Library + Upload buttons (reuse existing openAudioModal/sourceInputRef)
  • Mini audio player with repaint region seekbar overlay
  • Cover/Repaint mode toggle → cover strength slider or start/end time inputs
  • SFT model status banner (checking / downloading / ready / unavailable)

Repaint region seekbar overlay (both modes)

When taskType === 'repaint' and source duration is known, a green translucent overlay shows the [repaintingStart, repaintingEnd] region on the seekbar — visual confirmation of what will be regenerated.

Duration-aware repaint inputs (both modes)

Repaint start/end inputs now clamp to audio duration (max={sourceDuration}) and show a (max M:SS) label hint.

SFT model auto-switch

Selecting repaint mode automatically switches selectedModel to acestep-v15-sft, checks if the GGUF is on disk via /api/models/status, triggers download if absent (SSE stream tracks completion), and restores the previous model on exit.

Helpers extracted

  • handleClearSourceAudio() — consolidated remove-source logic
  • renderRepaintRegionOverlay() — shared seekbar overlay, used by both modes

i18n (i18n/translations.ts)

Added keys for repaint/cover mode labels, SFT status messages, and range input hints across all four languages (en, zh, ja, ko).


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

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title [WIP] Add autoswitch for repaint mode model download Wire repaint and cover modes with SFT model auto-switch and download Mar 7, 2026
…max constraints

Co-authored-by: lmangani <1423657+lmangani@users.noreply.github.com>
Copilot AI changed the title Wire repaint and cover modes with SFT model auto-switch and download Wire repaint/cover mode controls across UI + simple mode source audio Mar 7, 2026
@lmangani lmangani marked this pull request as ready for review March 8, 2026 00:22
@lmangani lmangani merged commit b2197d8 into main Mar 8, 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