Code to pretrain, fine-tune, and evaluate DreamZero and run sim & real-world evals
Code to pretrain, fine-tune, and evaluate DreamZero and run sim & real-world evals
A research project from NVIDIA GEAR Lab.
[Project Page] [Paper]
DreamZero is a World Action Model that jointly predicts actions and videos, achieving strong zero-shot performance on unseen tasks. This release package contains everything needed to load a pretrained DreamZero model and run distributed inference via a WebSocket server.
Available Now
Coming Soon
We provide an inference script that directly evaluates a hosted DreamZero-DROID policy on sim_evals. To test out the policy, first request access to the API via this form link. Then, follow these instructions to install sim_evals and launch evaluation.
…The outputs are saved in runs directory.
conda create -n dreamzero python=3.11
conda activate dreamzeropip install -e . --extra-index-url https://download.pytorch.org/whl/cu129MAX_JOBS=8 pip install --no-build-isolation flash-attnpip install --no-build-isolation transformer_engine[pytorch]pip install tensorrt==10.13.2.6 tensorrt_cu13==10.13.2.6 tensorrt_cu13_libs==10.13.2.6 tensorrt_cu13_bindings==10.13.2.6 --no-deps
pip install transformer_engine==2.10.0 transformer_engine_cu12==2.10.0 transformer_engine_torch==2.10.0We release a 14B pretrained DROID checkpoint on Huggingface. To download the checkpoint, run
hf download GEAR-Dreams/DreamZero-DROID --repo-type model --local-dir <path/to/checkpoint>To fine-tune DreamZero on a new embodiment (e.g. YAM, AgiBot), download the pretrained DreamZero-AgiBot checkpoint (~45GB) to ./checkpoints/DreamZero-AgiBot:
git clone https://huggingface.co/GEAR-Dreams/DreamZero-AgiBot ./checkpoints/DreamZero-AgiBotOr with the Hugging Face CLI:
hf download GEAR-Dreams/DreamZero-AgiBot --repo-type model --local-dir ./checkpoints/DreamZero-AgiBotThe YAM and AgiBot training scripts use pretrained_model_path=./checkpoints/DreamZero-AgiBot by default. See the new embodiment guide for usage.
The inference server uses PyTorch distributed training utilities to parallelize the model across multiple GPUs:
CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.run --standalone --nproc_per_node=2 socket_test_optimized_AR.py --port 5000 --enable-dit-cache --model-path <path/to/checkpoint>(Optional only for GB200) Tensorrt enables faster generation
export LOAD_TRT_ENGINE=<path/to/checkpoint>/tensorrt/wan/WanModel_nvfp4.trt
export DYNAMIC_CACHE_SCHEDULE=true
CUDA_VISIBLE_DEVICES=0,1 python -m torch.distributed.run --standalone --nproc_per_node=2 /mnt/aws-lfs-02/shared/seonghyeony/dreamzero/socket_test_optimized_AR.py --port 8000 --enable-dit-cache --model-path <path/to/checkpoint>To verify the server is working, run a test client. The first few inferences will take a few minutes to warm up. After warming up, inference takes ~0.6s on GB200 and ~3s on H100.
python test_client_AR.py --port 5000--port: Port number for the WebSocket server (default: 8000)--model-path: Path to the pretrained model checkpoint directory--enable-dit-cache: Enable caching in DiT layers for faster inference (recommended)--max-chunk-size: Override max_chunk_size for inference (optional)--timeout-seconds: Server timeout in seconds (default: 50000)--index: Index for output directory naming (default: 0)The server saves:
{model_path}/real_world_eval_gen_{date}_{index}/{checkpoint_name}/{output_dir}/inputs/{msg_index}_{timestamp}/Training on a new embodiment? See Adding a New Embodiment to DreamZero for a complete guide on converting your dataset, configuring modalities, and launching training. Make sure to align the 3 camera view order to ensure positive transfer.
DreamZero is built on top of Wan2.1-I2V-14B-480P and uses the umt5-xxl tokenizer. Download both before training:
pip install "huggingface_hub[cli]"
# You may need to set your HuggingFace token:
# export HF_TOKEN=<YOUR_HUGGINGFACE_TOKEN>
# Download Wan2.1 model weights (~28GB)
hf download Wan-AI/Wan2.1-I2V-14B-480P --local-dir ./checkpoints/Wan2.1-I2V-14B-480P
# Download umt5-xxl tokenizer
hf download google/umt5-xxl --local-dir ./checkpoints/umt5-xxlNote: The training script will auto-download these if they are not found at the configured paths, but pre-downloading is recommended to avoid delays at launch.
We release the preprocessed DROID dataset used to train DreamZero on HuggingFace: GEAR-Dreams/DreamZero-DROID-Data.
This dataset is derived from the DROID 1.0.1 dataset with the following modifications:
droid_sample_ranges_v1_0_1.json)exterior_image_1_left, exterior_image_2_left, wrist_image_leftTo download the preprocessed dataset (~131GB):
huggingface-cli download GEAR-Dreams/DreamZero-DROID-Data --repo-type dataset --local-dir ./data/droid_lerobotIf you want to reproduce the dataset conversion from raw DROID 1.0.1 yourself (or modify the filtering), see docs/DROID_CONVERSION.md.
# Configure paths (override defaults as needed)
export DROID_DATA_ROOT="./data/droid_lerobot"
export OUTPUT_DIR="./checkpoints/dreamzero_droid"
export NUM_GPUS=4
# Point to your downloaded model weights (if not using default paths)
export WAN_CKPT_DIR="./checkpoints/Wan2.1-I2V-14B-480P"
export TOKENIZER_DIR="./checkpoints/umt5-xxl"
# Launch training
bash scripts/train/droid_training.shUsing Wan2.2-TI2V-5B backbone (5B params, lower VRAM): To train with the smaller Wan2.2-TI2V-5B model instead of Wan2.1-I2V-14B, see docs/WAN22_BACKBONE.md and run bash scripts/train/droid_training_wan22.sh.
The training script uses Hydra for configuration and DeepSpeed ZeRO Stage 2 for distributed training. Key defaults:
| Parameter | Default | Description |
|---|---|---|
NUM_GPUS |
4 | Number of GPUs |
per_device_train_batch_size |
1 | Batch size per GPU |
learning_rate |
1e-5 | Learning rate |
max_steps |
10 | Max training steps (increase for full training) |
warmup_ratio |
0.05 | Warmup ratio |
weight_decay |
1e-5 | Weight decay |
image_resolution_width |
320 | Image width |
image_resolution_height |
176 | Image height |
num_frames |
33 | Number of video frames |
action_horizon |
24 | Action prediction horizon |
save_lora_only |
true | Only save LoRA weights |
bf16 |
true | Use bfloat16 precision |
Note:
max_steps=10is set for a quick sanity check. For full training, increase this to your desired number of steps and configuresave_steps/save_strategyaccordingly.
If you use DreamZero in your research, please cite:
…This project is licensed under the Apache License 2.0.
For issues and questions:
No open issues yet, or sync has not completed.