Supervised fine-tuning (SFT) of the Cosmos3 video generator on your own captioned video data. Tested on 8×H100 (80 GB).
| Recipe | Launch shell | Base model | Dataset |
|---|---|---|---|
| Vision SFT (full) | launch_sft_vision_nano.sh |
Cosmos3-Nano | BridgeData2-Subset-Synthetic-Captions |
| Vision SFT (LoRA) | launch_sft_vision_super.sh |
Cosmos3-Super | same as above |
| Vision SFT (full) | launch_sft_vision_edge.sh |
Cosmos3-Edge | same as above |
All recipes train on structured-JSON captions (caption_json, the model's native prompt format), so training stays aligned with inference. The Cosmos3-Edge recipe is a full fine-tune of the compact 2B dense Nemotron backbone (no audio/sound tokenizer); at 2B it also fits a 4-GPU node.
- Install the framework. These recipes drive
cosmos_framework.scripts.train, so install a cosmos-framework checkout first — follow the shared Cosmos Framework setup (clone intopackages/cosmos3, thenuv sync --all-extras --group=cu130-train; usecu128-trainon a CUDA 12.x driver). - Recommended container. For a curated CUDA + PyTorch base, NVIDIA recommends starting from the NGC PyTorch container
nvcr.io/nvidia/pytorch:25.09-py3(CUDA 13; use:25.06-py3for a CUDA 12.8 driver). See the framework setup guide. - Activate the framework venv so
cosmos_frameworkis importable:source <path-to>/packages/cosmos3/.venv/bin/activate. - Hugging Face access. Some assets are license-gated — accept terms on the dataset/model pages and authenticate once with
uvx hf@latest auth login(or exportHF_TOKEN). - Run from this directory (
cookbooks/cosmos3/generator/audiovisual/finetune/). Downloads, converted checkpoints, and run outputs default todata/,checkpoints/, andoutputs/here (all git-ignored).
Each launcher is a complete recipe — run it from this folder and it downloads the dataset, fetches the Wan2.2 VAE, converts the base checkpoint, then runs 8-GPU training (the download/convert steps are skipped if their outputs already exist):
bash launch_sft_vision_nano.sh # full SFT on Cosmos3-Nano
# or
bash launch_sft_vision_super.sh # LoRA SFT on Cosmos3-Super
# or
bash launch_sft_vision_edge.sh # full SFT on Cosmos3-Edge (2B; also fits a 4-GPU node)Paths are fixed at the top of each script (under this git-ignored folder) — edit them there to put data or checkpoints on another filesystem.
These recipes default to 8 GPUs. On a 4-GPU node (e.g. GB200×4), set --nproc_per_node=4 on the torchrun line in the launch script.
Training writes to outputs/train/<project>/<group>/<name>/:
checkpoints/iter_<N>/— DCP checkpoint (model / optim / scheduler / trainer state);checkpoints/latest_checkpoint.txtnames the newest.config.yaml, launch metadata, logs, and one directory per registered callback.
RUN_DIR=outputs/train/<project>/<group>/<name>
CKPT=$RUN_DIR/checkpoints/$(cat "$RUN_DIR/checkpoints/latest_checkpoint.txt")
python -m cosmos_framework.scripts.export_model \
--checkpoint-path "$CKPT" --config-file "$RUN_DIR/config.yaml" -o "$RUN_DIR/model"Use the exported $RUN_DIR/model with the audiovisual inference cookbook.
Convert the export into a Diffusers pipeline:
python -m cosmos_framework.scripts.convert_model_to_diffusers \
--checkpoint-path "$RUN_DIR/model" -o "$RUN_DIR/diffusers"The input is the Hugging Face directory produced by export_model above (not a raw DCP checkpoint), so run the export first. See the Export and Convert Checkpoints overview for details.
These recipes are intentionally minimal. For the full post-training reference — raw torchrun, resuming, every TOML field, parallelism / LoRA / EMA knobs, and the generator↔reasoner remap — see the canonical framework docs:
- Post-Training (SFT) guide
- SFT structured-TOML config reference
- JSONL dataset format · environment variables · FAQ / OOM during SFT
SFT here is a multi-GPU
torchrunjob, so these cookbooks ship as launch scripts + this README rather than a one-click notebook.