Fine-Tuning NVIDIA Cosmos Predict 2.5 with LoRA/DoRA for Robot Video Generation

Learn how to perform parameter-efficient fine-tuning on NVIDIA Cosmos Predict 2.5 using LoRA and DoRA to generate high-quality synthetic robot trajectories for downstream learning tasks.
NVIDIA Cosmos Predict 2.5 is a large-scale world model capable of generating physically plausible videos conditioned on text, images, or video clips. To adapt it to a specific domain, such as robot manipulation or a particular camera viewpoint, teams still need targeted fine-tuning.
Training robot policies requires demonstration data, but collecting real-robot trajectories is slow and expensive. Generating synthetic trajectories with a fine-tuned video world model offers a scalable alternative. However, full fine-tuning of a 2B-parameter model is expensive and risks catastrophic forgetting of general knowledge. LoRA and DoRA inject small trainable adapter modules into the frozen base model, reducing memory requirements while keeping the adapter files small and portable. This makes it practical to fine-tune on a single GPU and flexibly swap adapters for different domains at inference.
This guide walks through parameter-efficient fine-tuning of Cosmos Predict 2.5 with LoRA and DoRA, using the diffusers and accelerate libraries with support for both single- and multi-GPU training. We then show how to use the fine-tuned model to generate synthetic robot trajectories for downstream robot learning tasks.
- Python 3.10+
- PyTorch 2.5+ with CUDA
diffusers(pulls intransformersandpeftautomatically),accelerate- Optional: install
wandbto monitor training - At minimum one 80 GB GPU for single-GPU training; 8× H100s recommended for faster iteration
Install dependencies on your machine:
pip install -U "diffusers[torch]" transformers accelerate peft wandb
After installing diffusers, navigate to examples/cosmos to explore the example code.
We use the same datasets as the GR00T Dreams post-training recipe:
- Training Dataset: 92 robot manipulation videos with text prompts describing pick-and-place tasks.
- Test Dataset: 50 (prompt, image) pairs. The model should generate a video based on the input text prompt and the initial frame image.
Download and preprocess the training and test datasets using download_and_preprocess_datasets.sh:
bash download_and_preprocess_datasets.sh
The resulting training dataset folder looks like this:
gr1_dataset/train
├── metas/
│ └── *.txt
├── videos/
│ └── *.mp4
└── metadata.csv
The eval dataset is a flat directory of paired .txt and .png files for the (prompt, image) pairs:
gr1_dataset/test
├── filename1.txt
├── filename1.png
├── filename2.txt
├── filename2.png
└── ...
Source: Hugging Face Blog

















