Key concepts
Trainer API revolves around two objects:Dataset
A Dataset is the training data you upload for a LoRA run. You create it with the Dataset API, then upload its files until it’sREADY. It typically includes:
- images/videos
- caption
.txtfiles (same base filename as the media)
DRAFT → UPLOADING → READY).Only datasets in
READY can be mounted by a training job.
Training Job
A Training Job is an async run that executes your AI Toolkit YAML on a GPU. When a job starts, RunComfy:- mounts your
READYdataset into the training container (under/app/ai-toolkit/datasets/{dataset_name}) - runs the YAML config you provide
- produces artifacts such as LoRA checkpoints (
.safetensors), resolved config, and sample outputs
dataset_name (from the Dataset API).
Typical workflow
- Create a dataset (metadata)
- Upload dataset files, then wait until it becomes
READY - Submit a training job with your AI Toolkit YAML config (and
gpu_type) - Poll status and download results (
checkpoints,samples,config) - Run inference with the trained LoRA:
- as a dedicated endpoint via Serverless API (LoRA), or
- on-demand via Model APIs
