Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

ego_gen_train_code

Training code for 2-view egocentric video generation — a fine-tune of Cosmos Predict 2.5 (2B multiview DiT) that jointly generates two synchronized ego views of a 2-person interaction, conditioned on warped scene RGB, per-person skeleton pose, shared reference frames, Plücker camera rays, and (optionally) composite scene+human depth.

This repo is self-contained enough to resume training on a fresh server: it holds the full training code under cosmos-predict2.5/ and the actor-observer warm-start checkpoint under checkpoints/actorobs_shared_iter5500/. Datasets live in companion HF repos (see below).


⚡ Quickstart — run CoMind, warm-started from the actor-observer checkpoint, on a new server

This reproduces the comind_actoractor_personpose_shared run: CoMind 2-person actor-actor, person-ID pose, shared refs + Plücker, warm-started from the Nymeria actor-observer checkpoint (only the new conditioning is learned; no depth).

# ---- 0. get this repo (code + warm-start checkpoint) ----
pip install -U "huggingface_hub[cli]"
huggingface-cli download dhyun22/ego_gen_train_code --repo-type dataset \
  --local-dir ~/ego_gen_train_code
cd ~/ego_gen_train_code/cosmos-predict2.5

# ---- 1. environment (Python 3.10 + CUDA 12.8, FSDP2) ----
uv sync --frozen                      # reproduces the exact env from uv.lock into ./.venv
#   (or recreate the origin conda env `ego_dh`; then point PY= in sh/train_nymeria_longer.sh at it)

# ---- 2. CoMind dataset -> the EXACT path the config expects ----
huggingface-cli download dhyun22/ego_gen_comind --repo-type dataset \
  --local-dir /data4/comind_dataset

# ---- 3. actor-observer warm-start checkpoint -> the EXACT path the config expects ----
#     (it ships inside THIS repo under checkpoints/; copy it to the load_path the experiment hardcodes)
mkdir -p /data/model_output/warmstart
cp -r ~/ego_gen_train_code/checkpoints/actorobs_shared_iter5500 \
      /data/model_output/warmstart/actorobs_shared_iter5500

# ---- 4. base backbone + text tokenizer (public NVIDIA repos) ----
#   base 2B DiT: auto-downloaded on first run from `nvidia/Cosmos-Predict2.5-2B`
#   text tokenizer (16GB): download once and point COSMOS_QWEN_TOKENIZER_DIR at it
huggingface-cli download nvidia/Cosmos-Reason1-7B --local-dir /data/cosmos_reason1_7b

# ---- 5. secrets (not in this repo) ----
cat > ~/.ego_dh_secrets.sh <<'EOF'
export HF_TOKEN=hf_xxx            # HF pulls
export WANDB_API_KEY=xxx          # W&B logging (or unset to disable)
EOF
#   the launch script sources /home/ubuntu/.ego_dh_secrets.sh — put it there, or edit the path in sh/train_nymeria_longer.sh

# ---- 6. launch (4-GPU FSDP; DCP checkpoint reshards, so any NPROC works) ----
EXP=comind_actoractor_personpose_shared NPROC=4 PORT=29500 bash sh/train_nymeria_longer.sh

Why this "just works": the experiment comind_actoractor_personpose_shared hardcodes checkpoint.load_path = /data/model_output/warmstart/actorobs_shared_iter5500 and the CoMind data root /data4/comind_dataset. Steps 2–3 put the files at exactly those paths, so no overrides are needed. If you must use different paths, override on the CLI, e.g. append checkpoint.load_path=/my/ckpt to the launch command.

Expected sanity signals: iter-1 Loss ≈ 0.05–0.07 (low, because it warm-starts from the trained actor-observer). Checkpoints + validation videos land in /data/model_output/train/comind_actoractor_personpose_shared/; the run auto-resumes if that dir already has checkpoints/latest_checkpoint.txt. W&B run name == the experiment name.

Want the CoMind + synthetic mix instead? Use EXP=comind_synth_actoractor_personpose_shared and also download the synthetic set to /data3/synthetic_processed_multi. Everything else is identical.


Repository layout

cosmos-predict2.5/
  sh/train_nymeria_longer.sh              # launch script (torchrun + hydra)
  uv.lock                                 # pinned dependencies
  cosmos_predict2/_src/predict2_multiview/
    configs/vid2vid/experiment/nymeria_pose_2actor.py   # ALL experiments registered here
    configs/vid2vid/defaults/conditioner.py             # conditioning (pose/warp/refs/plucker/depth)
    networks/multiview_pose_dit.py                       # DiT + pose/plucker/depth embedders
    models/multiview_pose_model_rectified_flow.py        # rectified-flow model, VAE encode, trainable set
    datasets/nymeria_pairs.py                            # nymeria(longer/single)+synthetic loaders
    datasets/comind_pairs.py                             # CoMind actor-actor loader
    callbacks/nymeria_validation_viz.py                  # validation grid (warped|pose|GT|gen|depth)
checkpoints/
  actorobs_shared_iter5500/model/*.distcp + .metadata    # actor-observer warm-start (DCP, model-only, 3.9GB)

External artifacts (fetched in the Quickstart, summarized)

Artifact Path the code expects Source
CoMind dataset /data4/comind_dataset HF dhyun22/ego_gen_comind (public)
Nymeria longer (actor-actor) /data2/nymeria_processed_longer HF dhyun22/ego_gen_nymeria_longer (if used)
Synthetic multi /data3/synthetic_processed_multi companion upload (only for the +synth runs)
actor-observer warm-start /data/model_output/warmstart/actorobs_shared_iter5500 in THIS repo checkpoints/
base 2B DiT auto (HF cache) nvidia/Cosmos-Predict2.5-2B (auto/multiview/..._ema_bf16.pt)
text tokenizer (16GB) COSMOS_QWEN_TOKENIZER_DIR=/data/cosmos_reason1_7b nvidia/Cosmos-Reason1-7B

Each CoMind clip provides the training-required arrays (<clip>.npz = RGB + warped_cond + pose + pose_person; <clip>.refs.npz / shared refs; <clip>.campose.npz) plus a manifest/. Intermediate artifacts (raw depth pools, meshes/masks) are not needed at train time.


Registered experiments (in nymeria_pose_2actor.py)

EXP Data Warm-start Notes
comind_actoractor_personpose_shared CoMind actor-observer ckpt the Quickstart run; person-ID pose, shared refs; no depth
comind_synth_actoractor_personpose_shared CoMind + synthetic actor-observer ckpt same + synthetic mix
nymeria_synth_actoractor_depth_shared Nymeria longer + synthetic actor-observer ckpt adds composite-depth on the VAE channel axis
nymeria_actorobs_depth_shared Nymeria single (actor-observer) fresh from Cosmos base 2B stage-1 depth run trained from scratch

Launch any with EXP=<name> NPROC=<n> PORT=<p> bash sh/train_nymeria_longer.sh; extra hydra overrides pass through (e.g. trainer.max_iter=5). Outputs → $IMAGINAIRE_OUTPUT_ROOT/train/<name>/ (default /data/model_output).


Conditioning summary (what the model consumes)

  • warped_cond — scene RGB warped from a combined own+partner past-frame pool (max-coverage source per target).
  • pose / pose_person — per-person skeleton render; pose_person uses a view-invariant identity palette (same person → same color across both views).
  • refs_shared — one greedy set-cover reference set (V×R clean frames) identical in both views, injected as extra self-attention tokens with a custom RoPE and a zero-init ref_gate.
  • campose (Plücker) — per-pixel ray dir+moment in a per-pair canonical frame (view0/frame0), additive zero-init embedder.
  • depth (optional) — mesh_cond.npz['depth_comp']: warped scene depth (person-masked) + human mesh depth hole-fill, log-normalized turbo RGB; encoded through the frozen VAE and added via a zero-init depth_embedder.

All new conditioning modules are zero-init / missing-key, so any experiment warm-starts cleanly — from the actor-observer checkpoint (Quickstart) or from the Cosmos base 2B backbone.

Downloads last month
15