# Repository Briefing: Steller-Chen/VideoRSI-code
> Source: https://repoforai.com/repo/Steller-Chen/VideoRSI-code (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/Steller-Chen/VideoRSI-code
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: B+ (70/100 · Maintenance 35/35 · Adoption 4/25 · Releases 11/20 · License 20/20)
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: CLI, GPU, API
- **Momentum**: 196 ★ total (+24 24h / +24 7d) · 4 forks
- **When to Use**: Best for: Research teams and shot-previsualization workflows that need editable 3D scene programs and a way to diagnose camera or motion errors before final generation. Skip if: You need a lightweight one-step generator, output that is not constrained to the documented clip format, or cannot isolate a shell-capable agent.

## Overview
```text
### Architecture & Core Mechanics
VideoRSI separates scene control from photorealistic rendering. `inference.generate_program` uses Codex CLI with a Qwen3.8-27B–based director served by vLLM over a local OpenAI-compatible API. The agent writes a plan and Three.js scene in a workspace, renders keyframes, and iterates against checks defined by the `harness/` task and camera contracts. A separate renderer produces `proxy.mp4` from the delivered scene.

`inference.generate_reference_local` uses Qwen-Image-Edit-2511 to turn a proxy frame into a realistic reference still. `inference.generate_video` then conditions MiniMax-H3 on the proxy, still, and original prompt. The file-based handoffs let teams inspect or replace individual artifacts without rerunning the director. The inference stack uses PyTorch 2.7.1, Chromium via Playwright for scene rendering and checks, and a pinned Diffusers Git commit that supplies both model pipelines.

### Key Capabilities & Differentiators
The 4D checker in `harness/skills/verify4d.py` advances the scene with `reconstruction.seek()` and records object bounds and camera state over time. It flags suspect motion such as unsupported resting, jumps, and objects passing into one another, alongside shot problems and motion that may not survive video generation. The self-improvement method uses passing scenes to fine-tune the director and uses the same checks to refine its harness; those checks do not certify the final pixels.

The reference editor supports lighting and atmosphere, material descriptions, up to two image-based object identities, frame-time selection, and cropping. `--keep-steps` defaults to five of 20 denoising steps; increasing it gives the proxy more influence over geometry and camera motion. The generator checks input with `ffprobe` before loading the model: 960×544, 124 frames, 24 FPS, H.264/yuv420p, and no audio. The final H.264 MP4 uses the same resolution, frame count, and frame rate, but includes an audio track.

### Trade-offs & Limitations
Compared with direct text-to-video, VideoRSI gives teams an editable intermediate scene and makes geometry or camera errors easier to diagnose before final generation. Compared with judging rendered frames alone, time-sampled scene state can reveal intersections or missed camera motion that sparse frame inspection may miss. Bounding-box checks remain heuristics rather than a physics proof, and a clean proxy does not guarantee that MiniMax-H3 will preserve every motion or layout detail.

The cost of that control is a longer pipeline: agent sessions can run long, the checkpoints are large, and the generator enforces a fixed clip format. More proxy-conditioned denoising steps favor adherence; fewer give the generator more freedom. For adoption, test the shipped assets first to establish whether the video stage preserves the motion you care about, then add the director and its execution environment. Apache-2.0 covers the repository code; review the separately distributed model terms before commercial use or redistribution.

### Hardware & Deployment Guide
Use Linux x86_64 with NVIDIA GPUs and a driver compatible with CUDA 12.6, Python 3.10, Node.js 22+, and FFmpeg 6+. Install the CUDA 12.6 PyTorch wheels before `requirements.txt`; the scene stage also requires Playwright Chromium and `@openai/codex@0.163.0`. Serve the director from a separate `vllm==0.32.0` environment at `127.0.0.1:8000`. Set `TP` to fit BF16 weights and the 128K-token context. The agent runs shell commands without approvals or sandboxing by default: deploy it in a container or VM, and use `--sandbox workspace-write` to restrict its writes.

Weights are separate downloads: about 55 GB for the director, 210 GB for MiniMax-H3, and 55 GB for Qwen-Image-Edit. `download_h3.py` checks the pinned revision against `configs/h3_checkpoint.json` and writes an absolute checkpoint path into `modular_model_index.json`; rerun it after relocating the checkpoint. Run reference editing in a separate process to release GPU memory before video generation. The video CLI exposes `--text-device` and `--generation-device` and uses CPU offload. No tagged release is listed, so record the tested source revision alongside the model and runtime versions.
```

## Key Capabilities
```text
- Scene inspection: `skills/verify4d.py` samples object bounds and camera state through `reconstruction.seek()`.
- Director integration: Codex CLI works against a local OpenAI-compatible vLLM endpoint; `TP` configures director sharding.
- Independent stages: Four examples ship scene source, proxy video, reference image, and prompt for testing without the director.
- Appearance controls: Reference editing accepts lighting and material guidance, frame selection, cropping, and up to two image-based identities.
- Motion conditioning: `--keep-steps` controls how many of 20 denoising steps use the proxy; the default is five.
- Media contract: `ffprobe` validates silent 960×544 H.264/yuv420p proxies at 124 frames and 24 FPS; final MP4s include audio.
```

## Quick Start / Clone
```bash
conda create -n videorsi python=3.10 -y
conda activate videorsi
conda install -c conda-forge "ffmpeg>=6" "nodejs>=22" -y
python -m pip install --upgrade pip
python -m pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 \
  --index-url https://download.pytorch.org/whl/cu126
python -m pip install -r requirements.txt
python -m playwright install --with-deps chromium   # renderer and 4D self-check (step 1)
npm install -g @openai/codex@0.163.0                 # agent runtime (step 1)
```
