train_start
Manage LoRA training jobs: launch runs on local GPU or RunPod, check progress, cancel, delete, and preview job configurations before starting.
Instructions
Run and inspect LoRA training JOBS — launch a run, poll it, stop it, delete it, and read back the settings behind it. Jobs are keyed by id; the datasets they train on live in the separate train_prepare_dataset tool and are keyed by name. Driven by the action parameter:
action:"start" — Start a LoRA training job: target 'local' builds the config and launches the GPU trainer container (docker run --gpus all); target 'pod' ssh-drives pod-native training on a connected RunPod pod (pod_id, or the connector's currently connected pod). Requires
name+datasetPath. Returns a job id for action:"status"/action:"cancel". Long-running — returns immediately; poll action:"status". On completion the LoRA is delivered per deliverTo (pod/local/both) and cataloged when local. Run train_doctor first if unsure the image/docker/GPU (local) or bootstrap (pod) are ready.action:"status" — Check training progress: pass an
idfor one job (step/total, loss, recent samples, log tail, result paths when done) or OMITidfor all jobs newest-first. Read-only.action:"cancel" — STOP a RUNNING job (docker stop) by
idand mark it cancelled. Nothing is erased: checkpoints already saved stay in the job's output dir; no LoRA is handed off to models/loras, so the run can be inspected afterwards. Returns ok:false when the container could not be confirmed stopped (the job reverts to running). This is the RECOVERABLE stop — use action:"delete" only when you also want the artifacts gone.action:"delete" — DESTROY a finished job by
id: its record AND its output dir with checkpoints/samples, unless keep_outputs is true. Irreversible — confirm with the user first. The delivered LoRA in models/loras is NOT removed. Running/queued jobs must be cancelled first (action:"cancel"). THIS DELETES A JOB, NOT A DATASET: to delete the staged images and captions a run consumed use the separatetrain_prepare_datasettool with action:"delete", which is keyed bynamerather thanid.action:"list_flows" — List the LoRA training flows and base models the local trainer supports (phase 1: character LoRA on FLUX.1-dev), with the default training params. Read-only, takes no other parameters — call this first to see what action:"start" accepts.
action:"job_config" — Show the effective settings a job ran with by
id(steps/lr/rank/resolution/batch/saveEvery/sampleEvery/quantize), read back from the ai-toolkit config.yml it consumed, plus flow/model/trigger/datasetPath — everything needed to run the job again with tweaks. Read-only.action:"preview_config" — Show the RAW ai-toolkit config.yml action:"start" WOULD write for these settings (the ostris-UI 'raw config' view) — no side effects, nothing is written or started. Requires
name+datasetPath. Use it to review a run before launching; pass the same params to action:"start" to execute.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Training job id, as returned by action:"start" (e.g. "t8f3k2ab") — NEVER a dataset name. REQUIRED and must be non-empty for actions "cancel", "delete" and "job_config". OPTIONAL for action:"status": omit it (or pass an empty string) to list every job newest-first. Unused by "start", "list_flows" and "preview_config". | |
| flow | No | action:"start" — training flow (see action:"list_flows"). | character |
| name | No | Job name — becomes the output .safetensors basename (e.g. 'aria_character'). REQUIRED for actions "start" and "preview_config". This names the RUN, not the dataset it reads. | |
| model | No | action:"start" — base model (see action:"list_flows"). | flux1-dev |
| action | Yes | Which training-job operation to perform. "list_flows" takes no other parameters; "status" takes an OPTIONAL `id` (omit for all jobs); "cancel", "delete" and "job_config" require `id`; "start" and "preview_config" require `name` + `datasetPath`. NOTE "delete" here destroys a training JOB — deleting a staged DATASET is train_prepare_dataset action:"delete". | |
| device | No | action:"start" — GPU selector, default cuda:0. | |
| params | No | Training param overrides for actions "start" and "preview_config" (steps/lr/rank/resolution/batchSize/saveEvery/sampleEvery/quantize). Omitted keys fall back to the defaults from action:"list_flows". action:"preview_config" enforces the SAME bounds action:"start" does, so a preview always reflects a run that could actually launch. | |
| pod_id | No | action:"start" — RunPod pod to train on (target 'pod'). Default: the connector's currently connected/watched pod. | |
| target | No | action:"start" — 'local' = docker on this rig; 'pod' = pod-native over ssh on a RunPod pod. | local |
| trigger | No | Unique trigger word (e.g. 'ohwx person') — injected as trigger_word and usable in prompts. | |
| deliverTo | No | action:"start", pod jobs only: where the finished LoRA lands. | both |
| model_path | No | action:"start" — override the base model path AS THE TRAINER SEES IT (pod path for target 'pod', container path for 'local') — e.g. a pre-uploaded local HF snapshot dir when the default HF repo id is gated/unreachable. | |
| datasetPath | No | Dataset dir from train_prepare_dataset (images + same-basename .txt captions). REQUIRED for actions "start" and "preview_config". | |
| keep_outputs | No | action:"delete" — keep the job's output dir (checkpoints/samples) and delete only the record. |