Skip to content
How-to GuideUnreviewed

Train acoustic models

Train acoustic models locally, on Modal, or on SkyPilot by passing an experiment configuration (--config) and a target runtime (--runtime) to vocalsynth train.

Before launching a run, prepare and verify dataset caches according to Data Preparation. That guide covers both legacy v1 caches and v2 caches for multilingual AcousticV2 runs such as Experiment #9. Multilingual pretraining targets, corpus exclusions, and variance conditioning follow Experiment #9 and Variance and F0 parameter reference. For the reference baseline, see Baselines.

Setup

Copy the runtime configuration templates and set paths, hardware devices, and credentials:

cp infra/runtime/local.example.toml infra/runtime/local.toml
cp infra/runtime/modal.example.toml infra/runtime/modal.toml
cp infra/runtime/skypilot.example.toml infra/runtime/skypilot.toml

Local training reports progress to the Dashboard if endpoint and token are configured. Cloud runs require Dashboard access to allocate run numbers.

Local training

Launch a local training run:

uv run --project research/vocalsynth vocalsynth train \
  --config research/vocalsynth/configs/experiments/4/2.toml \
  --runtime infra/runtime/local.toml \
  --title "Experiment title"

Training writes per-attempt logs and execution checkpoints (step_<step>.pt) to local/runs/<attempt_id>/, while local/checkpoints/ holds exported/downloaded weights (local/checkpoints/<exp>.<run>.<attempt>@<step>.pt) for inference, evaluation, and the preview editor (see Storage).

Stop a running local job cleanly after the current update step:

uv run --project research/vocalsynth vocalsynth cancel \
  --run 3.1 \
  --runtime infra/runtime/local.toml

Cloud training (Modal)

Upload prepared feature caches and assets to the Training Store (or directly to the Modal input Volume when [training_store] is unconfigured):

uv run --project research/vocalsynth --extra modal vocalsynth upload \
  --config research/vocalsynth/configs/experiments/4/2.toml \
  --source-runtime infra/runtime/local.toml \
  --runtime infra/runtime/modal.toml

Pass --dry-run to inspect the plan without transferring files.

Launch training on Modal:

uv run --project research/vocalsynth --extra modal vocalsynth train \
  --config research/vocalsynth/configs/experiments/4/2.toml \
  --runtime infra/runtime/modal.toml \
  --title "Experiment title"

Modal runs synchronize state and checkpoints to the Training Store. Export a single checkpoint locally to local/checkpoints/<exp>.<run>.<attempt>@<step>.pt:

uv run --project research/vocalsynth vocalsynth cloud download \
  --run 6.4 --runtime infra/runtime/modal.toml

Cloud training (SkyPilot)

Use the training run number printed by vocalsynth train (not the job IDs printed by sky) for status, logs, cancellation, checkpoint downloads, and resuming. Cloud instances are removed automatically after the task ends.

Setup

Install the cloud dependencies and verify provider access:

cd research/vocalsynth && uv sync --locked --extra skypilot --extra storage
uv run --project research/vocalsynth sky check

The skypilot extra is pinned to a commit on the vocalsynth branch of wavwonder/skypilot in pyproject.toml. To update it, change the pinned rev, run uv lock, and commit pyproject.toml and uv.lock together.

Enable jobs.allow_event_callback: true in ~/.sky/config.yaml before starting the SkyPilot API server so the controller archives job logs on completion.

Configure the provider, GPU, and [training_store] (Training Store) in infra/runtime/skypilot.toml, and load the Training Store and Dashboard credentials from .env via uv:

export UV_ENV_FILE="$PWD/.env"

Keep loopback addresses in NO_PROXY when using an HTTP proxy so the CLI can reach the local SkyPilot service.

Training dependency image

The Training dependency image GitHub Actions workflow builds and verifies the dependency image when uv.lock, .python-version, or infra/docker/training/Dockerfile change, or on manual dispatch. Copy the @sha256:... image reference from the workflow summary (or fetch the latest verified artifact via GitHub CLI) into skypilot.image_id in infra/runtime/skypilot.toml, prefixed with docker::

gh run download \
  "$(gh run list --workflow training-image.yml --branch main --status success --limit 1 --json databaseId --jq '.[0].databaseId')" \
  -n training-image -D /tmp/vocalsynth-image && cat /tmp/vocalsynth-image/training-image.txt

Because the GHCR package is private, configure pull credentials in .env using a GitHub classic token with read:packages (for example, from a dedicated pull account with Read permission on the package):

SKYPILOT_DOCKER_USERNAME=registry-reader
SKYPILOT_DOCKER_PASSWORD=your-read-packages-token
SKYPILOT_DOCKER_SERVER=ghcr.io

Keep this token valid while a job may need a replacement instance, because resumed submissions load the current local credentials. Rebuild and update skypilot.image_id when training dependencies change. Standard CUDA images install dependencies during setup instead.

Prepare and submit

Upload prepared dataset caches and vocoder assets before starting training, and repeat when those inputs change (add --dry-run to preview):

uv run --project research/vocalsynth vocalsynth upload \
  --config research/vocalsynth/configs/experiments/6/4.toml \
  --source-runtime infra/runtime/local.toml \
  --runtime infra/runtime/skypilot.toml

uv run --project research/vocalsynth vocalsynth train \
  --config research/vocalsynth/configs/experiments/6/4.toml \
  --runtime infra/runtime/skypilot.toml \
  --title "Experiment title"

vocalsynth train prints the allocated run and attempt (6.4.1) and log command before submitting. Closing the terminal leaves the submitted task running.

Managed Jobs rents a separate controller instance for orchestration while jobs are active. Once all jobs finish, logs are archived to the Training Store and the controller shuts down automatically. If archival fails, automatic shutdown is disabled so logs remain recoverable.

Status and logs

List runs to find the run and attempt reference you need. Re-running a failed or cancelled run keeps <exp>.<run> and allocates <exp>.<run>.<attempt+1>, while --resume continues an attempt in place.

uv run --project research/vocalsynth vocalsynth cloud status --runtime infra/runtime/skypilot.toml

Add --run 6.4 (or --run 6.4.1) to include a launch request while the controller is still provisioning.

Read a run’s startup, failure, or archived logs (archived logs require the Training Store credentials from setup):

uv run --project research/vocalsynth vocalsynth cloud logs --run 6.4 --runtime infra/runtime/skypilot.toml

Add --follow to stream training output. Press Ctrl + C to close the viewer and leave training running:

uv run --project research/vocalsynth vocalsynth cloud logs --run 6.4 --follow --runtime infra/runtime/skypilot.toml

The table below summarizes the job statuses returned by vocalsynth cloud status.

Status Meaning
PENDING, STARTING Waiting for resources or starting an instance.
RUNNING Installing dependencies or running training (check the job logs to distinguish them).
RECOVERING Replacing an interrupted instance.
FAILED, FAILED_SETUP Execution stopped with an error recorded in the run’s logs.
SUCCEEDED The submitted task completed successfully.
CANCELLED The task was stopped.

A resource-unavailable message in logs may be followed by a successful allocation in another region. Check the final status and error before treating an earlier allocation attempt as a failure.

Stop or download

Stop training after the current update and save a checkpoint:

uv run --project research/vocalsynth vocalsynth cancel --run 6.4 --runtime infra/runtime/skypilot.toml

Cancellation is graceful: training stops after the current update, saves a checkpoint, and records the attempt as CANCELLED. Resuming continues from that checkpoint.

Terminate a cloud task (or cancel a launch that is still provisioning the controller) when graceful cancellation is not possible:

uv run --project research/vocalsynth vocalsynth cloud terminate --run 6.4 --runtime infra/runtime/skypilot.toml

Download a single labeled checkpoint to local/checkpoints/<exp>.<run>.<attempt>@<step>.pt by default, or pass --full to recover the complete training directory into local/runs/<attempt_id>/ for local resuming:

uv run --project research/vocalsynth vocalsynth cloud download \
  --run 6.4 --runtime infra/runtime/skypilot.toml

uv run --project research/vocalsynth vocalsynth cloud download \
  --run 6.4 --full --runtime infra/runtime/skypilot.toml

To continue the same attempt after resolving a failure, see Resuming and Initializing, or re-run vocalsynth train to allocate the next attempt (6.4.2).

Resuming and initializing

--resume continues an interrupted attempt in place, restoring its optimizer state and step count (--updates specifies the total target step count, including completed steps). Pass --allow-config-change when intentionally changing dataset selection before resuming. Phoneme and singer vocabularies must still match the checkpoint.

Resume by run reference (3.1 or 3.1.1), immutable attempt ID (42), or local attempt directory (local/runs/42). Omitting the attempt targets the latest attempt of that run. Cancelled and finished attempts are resumable across backends via the Training Store. On SkyPilot, the previous job must have ended, and a finished or failed attempt can be resumed even after the controller has been deleted:

# Local
uv run --project research/vocalsynth vocalsynth train \
  --config research/vocalsynth/configs/experiments/4/2.toml \
  --runtime infra/runtime/local.toml \
  --resume 4.2

# Modal
uv run --project research/vocalsynth --extra modal vocalsynth train \
  --config research/vocalsynth/configs/experiments/4/2.toml \
  --runtime infra/runtime/modal.toml \
  --resume 4.2

# SkyPilot
uv run --project research/vocalsynth vocalsynth train \
  --config research/vocalsynth/configs/experiments/6/4.toml \
  --runtime infra/runtime/skypilot.toml \
  --resume 6.4

--init-from starts a new run initialized from an existing checkpoint’s model weights and normalization statistics, with a fresh optimizer, sampler, and step counter. The source attempt is recorded as the parent, and phoneme/singer vocabularies and model weight shapes must be compatible.

Pass either a checkpoint reference <exp>.<run>.<attempt>@<step> (resolved from local local/runs/<attempt_id>/ or the Training Store across Local, Modal, and SkyPilot) or an explicit local .pt file path:

# Local (by checkpoint reference or explicit .pt file path)
uv run --project research/vocalsynth vocalsynth train \
  --config research/vocalsynth/configs/experiments/8/1.toml \
  --runtime infra/runtime/local.toml \
  --init-from 7.2.5@20000

uv run --project research/vocalsynth vocalsynth train \
  --config research/vocalsynth/configs/experiments/4/2.toml \
  --runtime infra/runtime/local.toml \
  --init-from local/checkpoints/3.1.1@4000.pt

# Modal
uv run --project research/vocalsynth --extra modal vocalsynth train \
  --config research/vocalsynth/configs/experiments/8/1.toml \
  --runtime infra/runtime/modal.toml \
  --init-from 7.2.5@20000

# SkyPilot
uv run --project research/vocalsynth vocalsynth train \
  --config research/vocalsynth/configs/experiments/8/1.toml \
  --runtime infra/runtime/skypilot.toml \
  --init-from 7.2.5@20000

When initializing a cloud run from an unuploaded local .pt file, upload it first with vocalsynth upload --checkpoint local/checkpoints/3.1.1@4000.pt ... or reference its synced <exp>.<run>.<attempt>@<step> identifier.

Target singer adaptation

After pretraining on the multi-singer mixture, pass --stage adapt to train on the held-out target singer’s song splits (see Song and Singer Splits). --trainable selects which parameters are updated during adaptation (all, singer for the singer embedding only, or singer_adapter for the singer embedding and residual adapters):

uv run --project research/vocalsynth vocalsynth train \
  --config research/vocalsynth/configs/experiments/8/1.toml \
  --runtime infra/runtime/local.toml \
  --stage adapt \
  --trainable singer_adapter \
  --init-from 7.2.5@20000 \
  --updates 1000 \
  --title "Adapt to target singer"

When resuming an adaptation attempt with --resume, pass the same --stage and --trainable flags used to start it.

Managing experiments and runs

Every training run and attempt attaches to an experiment based on the config path and CLI flags:

  • research/vocalsynth/configs/experiments/<exp>/<run>.toml: Infers experiment #<exp> and run #<exp>.<run> automatically, writing outputs to local/runs/<attempt_id>/. Re-running after failure, cancellation, or interruption allocates the next attempt (<exp>.<run>.<attempt+1>). Pass --new-attempt to create a new attempt after FINISHED, and pass --title "<title>" to set the title when opening a new experiment.
  • Other config paths: Use --experiment <N> to attach to existing experiment #N, or --title "<title>" to find or create an experiment by title. The next run number in that experiment is allocated automatically.

Monitor active runs on the Dashboard or list recorded experiments and runs from the CLI:

uv run --project research/vocalsynth vocalsynth experiments --runtime infra/runtime/modal.toml
uv run --project research/vocalsynth vocalsynth runs --runtime infra/runtime/modal.toml --experiment 3

Record each experiment’s investigation and conclusions in docs/research/vocalsynth/experiments/<N>.mdx (see How We Docs).

Type to search…

↑↓ navigate↵ selectEsc close