StressDream / Ctrl-World (Manipulation)

May 27, 2026 ยท View on GitHub

Steering Ctrl-World robotic manipulation video world model.


๐Ÿ› ๏ธ Installation

conda env create -f ctrl_world/environment.yml
conda activate stressdream-ctrlworld

Python 3.11, PyTorch 2.9.1+cu128, Diffusers 0.36, Transformers 4.57. Requires NVIDIA driver โ‰ฅ 520 (CUDA 12.8 runtime).

  • Requires ~20 GB VRAM for full optimization (Qwen3-VL reward + noise optimization).

๐Ÿ“ฅ Checkpoints

Three checkpoints are required (~16.6 GB total):

FileSource
ckpts/Ctrl-World/coffee_bag.ptjunwon-seo/StressDream
ckpts/stable-video-diffusion-img2vid/stabilityai/stable-video-diffusion-img2vid
ckpts/clip-vit-base-patch32/openai/clip-vit-base-patch32
pip install -U huggingface_hub          # provides the new `hf` CLI

mkdir -p ckpts/Ctrl-World
hf download junwon-seo/StressDream \
    coffee_bag.pt --local-dir ckpts/Ctrl-World

hf download stabilityai/stable-video-diffusion-img2vid \
    --local-dir ckpts/stable-video-diffusion-img2vid
hf download openai/clip-vit-base-patch32 \
    --local-dir ckpts/clip-vit-base-patch32

Older huggingface-cli is deprecated โ€” use hf (shipped with recent huggingface_hub).

Qwen3-VL-4B-Instruct (~8 GB) is fetched automatically by transformers on first run.


Nominal (random noise)


Steered (Qwen3-VL reward)


๐Ÿš€ Demo

A sample trajectory (example_data/traj_0001.hdf5, candy-coffee task) is included. Run from the StressDream/ root:

python ctrl_world/run_steering.py \
    --hdf5_path ctrl_world/example_data/traj_0001.hdf5

Nominal imagination (no noise optimization) โ€” compare with the steered imagination:

python ctrl_world/generate_nominal.py \
    --hdf5_path ctrl_world/example_data/traj_0001.hdf5

Override the instruction or reward prompt:

python ctrl_world/run_steering.py \
    --hdf5_path ctrl_world/example_data/traj_0001.hdf5 \
    --instruction "put the coffee bag into the container without spilling" \
    --qwen_prompt "Is the coffee bean spilled? Respond Yes or No."

Outputs are written under outputs/ctrl_world_nominal/<timestamp>/.


๐Ÿ“‚ Outputs

run_steering.py writes to outputs/ctrl_world_steering/<timestamp>/:

FileDescription
step_<n>_best.mp4Best multi-view rollout per interact step (GT prefix + generated)
full_steered.mp4All steps concatenated
history.jsonPer-iteration reward, noise norm, regularizer values
optimized_noise.ptFinal optimized noise tensor

generate_nominal.py writes to outputs/ctrl_world_nominal/<timestamp>/:

FileDescription
step_<n>_nominal.mp4Multi-view rollout per interact step (GT prefix + generated)
full_nominal.mp4All steps concatenated
history.jsonPer-step Qwen reward

โš™๏ธ Configuration

Hyperparameters live in steering_config.yaml. Key groups:

GroupControls
taskInstruction, Qwen prompt, success/failure target
modelFrames per rollout window
hdf5Camera order, rgb_skip, crop, start window
qwenModel name, frames per query
optimIters, lr, grad scale/clamp, noise-norm threshold
regularizerSpectral / std-permutation / KL-spherical coefficients
outputSave dir, fps

CLI flags override YAML values.


๐Ÿ“ Layout

ctrl_world/
โ”œโ”€โ”€ run_steering.py        # CLI entrypoint (steered imagination)
โ”œโ”€โ”€ generate_nominal.py    # CLI entrypoint (nominal baseline)
โ”œโ”€โ”€ steering_config.yaml   # hyperparameters
โ”œโ”€โ”€ environment.yml        # conda env
โ”œโ”€โ”€ wm_helpers.py          # HDF5 loader, forward, decode helpers
โ”œโ”€โ”€ rewards.py             # Qwen3-VL reward
โ”œโ”€โ”€ models/                # Ctrl-World UNet, pipeline, action adapter
โ”œโ”€โ”€ dataset_meta_info/     # state percentile JSON for action normalization
โ”œโ”€โ”€ example_data/          # bundled traj_0001.hdf5
โ””โ”€โ”€ ckpts/                 # symlinks (re-link if you move the repo)