Skip to content
vita-epflPublic

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

🌀 Proprio

Latent Self-Scoring and Inference-Time Refinement for Physically Plausible Video Generation

Accepted at NeurIPS 2026

Mariam Hassan · Kaouther Messaoud · Wuyang Li · Alexandre Alahi
EPFL · Télécom Paris

arXiv Project Page


📌 Overview

Proprio Summary PDF

Modern video generative models produce visually impressive results, yet frequently violate basic physical principles. We propose Proprio, a training-free framework that enables a frozen video generator to assess and improve the physical plausibility of its own outputs. Inspired by proprioception, the biological sense of one’s own movement, Proprio treats the model's flow residual under controlled latent perturbations as a self-scoring signal. Samples that are better explained by the generator’s learned dynamics induce smaller and more stable residuals. We aggregate this signal across timesteps and perturbations, focus it on motion-relevant regions with a dynamic spatiotemporal mask, and use it for best-of-N search, gradient-based self-refinement, or both. Across text-to-video and image-to-video benchmarks, Proprio consistently improves physical plausibility, outperforming VLM-based scoring and external world-model baselines in several settings. On TurboWan2.2, Proprio improves Physics-IQ from 32.2 to 37.5 (+16.5%) and VideoPhy2-hard physical commonsense from 45.6 to 55.0 (+20.6%). Human evaluation further shows that raters prefer Proprio-selected or refined videos for physical plausibility in roughly two-thirds of comparisons. These results suggest that frozen video generators contain actionable internal signals for evaluating and improving the physical plausibility of their own outputs.

💻 Code

The TurboWan release includes separate commands for ranking saved videos and refining a generation. Both use the same latent residual scorer.

Model Refine initial noise Score and rank saved videos
TurboWan2.1 text-to-video refine_t2v.py score_t2v.py
TurboWan2.2 image-to-video refine_i2v.py score_i2v.py

Installation

Use Linux, Python 3.11 or 3.12, and an NVIDIA GPU with BF16 support. For a fresh CUDA 12.8 environment, install the matching PyTorch and torchvision wheels. In a CUDA container with working PyTorch, torchvision, and Triton, start with the second command.

python -m pip install torch==2.8.0 torchvision==0.23.0 --index-url https://download.pytorch.org/whl/cu128
python -m pip install -r requirements.txt
python -m pip install setuptools wheel packaging psutil ninja
python -m pip install flash-attn --no-build-isolation

If your environment already provides FlashAttention, skip its installation. Building it from source requires a CUDA toolkit compatible with your PyTorch build. The first run also fetches the umT5 tokenizer.

Checkpoints

Place the weights for your chosen model, plus the shared VAE and text encoder, in checkpoints/. The commands below use the unquantized weights.

Use Files Source
Both models Wan2.1_VAE.pth, models_t5_umt5-xxl-enc-bf16.pth Wan2.1
T2V TurboWan2.1-T2V-14B-720P.pth TurboWan2.1 T2V 14B
I2V TurboWan2.2-I2V-A14B-high-720P.pth, TurboWan2.2-I2V-A14B-low-720P.pth TurboWan2.2 I2V A14B

Refine one dataset item

The commands below use the settings from the one-item equivalence runs. Both generate 81 frames at 480p with the 720p checkpoints. Create t2v.jsonl and i2v.jsonl with one JSON object per line. For the I2V example, put your conditioning image at images/input.png.

t2v.jsonl

{"future_caption":"A red ball rolls down a wooden ramp and bounces on a tiled floor.","generated_video_name":"ball.mp4"}

i2v.jsonl

{"future_caption":"The red ball rolls down the ramp and bounces on the floor.","image_path":"input.png","generated_video_name":"ball.mp4"}

Text-to-video

python -u refine_t2v.py \
  --model Wan2.1-14B --dit_path checkpoints/TurboWan2.1-T2V-14B-720P.pth \
  --dataset_json t2v.jsonl --outdir output/t2v --max_videos 1 \
  --prompt_field future --num_alternatives 1 --seed 0 \
  --num_frames 81 --resolution 480p --aspect_ratio 16:9 \
  --num_steps 4 --noise_opt_inference_steps 4 \
  --noise_opt_loss_type dynamic --dynamic_mask_source seed_baseline \
  --noise_opt_steps 8 --noise_opt_lr 2e-3 --noise_opt_kl_lambda 5e-3 \
  --noise_opt_mu_init 0.0 --noise_opt_sigma_init 1.0 --likephys_num_noises 4 \
  --attention_type sla --sla_topk 0.1 --no-default_norm \
  --dyn_mask_adapt_during_opt --no-noise_opt_lr_drop_on_two_up \
  --save_baseline_video

Image-to-video

python -u refine_i2v.py \
  --model Wan2.2-A14B \
  --high_noise_model_path checkpoints/TurboWan2.2-I2V-A14B-high-720P.pth \
  --low_noise_model_path checkpoints/TurboWan2.2-I2V-A14B-low-720P.pth \
  --dataset_json i2v.jsonl --images_root images --outdir output/i2v --max_videos 1 \
  --prompt_field future --num_alternatives 1 --seed 0 \
  --num_frames 81 --resolution 480p --aspect_ratio 16:9 --num_steps 1 \
  --noise_opt_loss_type dynamic --dynamic_mask_source seed_baseline \
  --noise_opt_steps 10 --noise_opt_lr 2e-3 --noise_opt_grad_clip 3e-4 \
  --noise_opt_mu_init 0.0 --noise_opt_sigma_init 1.0 --noise_opt_kl_lambda 5e-3 \
  --likephys_num_noises 6 --attention_type sla --sla_topk 0.1 --default_norm \
  --save_baseline_video

The I2V job requested four optimization denoising steps. The runner caps that value at --num_steps, so this one-step example uses the equivalent default. Both examples write ball.mp4, an optimization JSON, and a ranking JSON under the specified output directory. The baseline is saved as baseline/ball.mp4 within that directory.

Remove --max_videos 1 to process the full dataset. Increase --num_alternatives for best-of-N seed search followed by refinement of the lowest-scoring candidate. Use --resume to skip completed items. For a single prompt without a manifest, use --prompt and --save_path, plus --image_path for I2V, in place of the dataset options.

Score and rank saved videos

Pass videos that share a prompt and, for I2V, the original conditioning image. These examples score the baseline and refined video on the same motion mask for each pair.

python score_t2v.py output/t2v/baseline/ball.mp4 output/t2v/ball.mp4 \
  --model Wan2.1-14B --dit_path checkpoints/TurboWan2.1-T2V-14B-720P.pth \
  --prompt "A red ball rolls down a wooden ramp and bounces on a tiled floor." \
  --num_steps 4 --likephys_num_noises 4 --no-default_norm \
  --mask_video_path output/t2v/baseline/ball.mp4 --output output/t2v_scores.json
python score_i2v.py output/i2v/baseline/ball.mp4 output/i2v/ball.mp4 \
  --high_noise_model_path checkpoints/TurboWan2.2-I2V-A14B-high-720P.pth \
  --low_noise_model_path checkpoints/TurboWan2.2-I2V-A14B-low-720P.pth \
  --prompt "The red ball rolls down the ramp and bounces on the floor." \
  --image_path images/input.png --num_steps 1 --likephys_num_noises 6 \
  --mask_video_path output/i2v/baseline/ball.mp4 --output output/i2v_scores.json

Lower scores rank first. Omit --mask_video_path to build a mask for each clip or use --noise_opt_loss_type global to score the whole latent. Saved-video scores can differ from the refinement log because the scoring commands re-encode the MP4 and refinement scores the generator’s latents. Run any of the four scripts with --help for all options.

Citation

@inproceedings{hassan2026proprio,
  title   = {Proprio: Latent Self-Scoring and Inference-Time Refinement for Physically Plausible Video Generation},
  author  = {Hassan, Mariam and Messaoud, Kaouther and Li, Wuyang and Alahi, Alexandre},
  booktitle = {Conference on Neural Information Processing Systems (NeurIPS)},
  year    = {2026}
}

Acknowledgments

The TurboWan backend is adapted from TurboDiffusion and uses model components from Wan. See LICENSE and the source headers for attribution.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages