[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-111584":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":25,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},111584,"Video-Coder","CYWang735\u002FVideo-Coder","CYWang735","Video-Coder: Reinforcing Agentic Coding for Video Generation","https:\u002F\u002Fcywang735.github.io\u002FVideo-Coder\u002F",null,"Python",90,3,1,4,0,8,15,24,64.71,false,"main",true,[],"2026-11-13 21:14:52","2026-11-23 12:48:00","# Video-Coder: Reinforcing Agentic Coding for Video Generation\n\n[[🌐 Project Page](https:\u002F\u002Fcywang735.github.io\u002FVideo-Coder\u002F)] [[📖 Paper](https:\u002F\u002Farxiv.org\u002Fabs\u002F2611.09894)] [[🤗 Video-Coder-9B-model](https:\u002F\u002Fhuggingface.co\u002FVideo-Coder\u002FVideo-Coder-9B)] [🤗[Video-Coder-SFT-model](https:\u002F\u002Fhuggingface.co\u002FVideo-Coder\u002FVideo-Coder-SFT-9B)] [[🤗 Video-Coder-train-data](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FVideo-Coder\u002FTrain-Data)] \n\n## 👀 About Video-Coder\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fteaser.png\" alt=\"Video-Coder overview\" width=\"100%\">\n\u003C\u002Fdiv>\n\nWe introduce **Video-Coder**, a code-driven video generation agent that autonomously writes and executes Blender Python programs to construct dynamic 3D scenes. The rendered **Draft Video** provides explicit structure and motion signals to downstream video generators.\n\nWe develop the **Video-Coder Harness**, a unified interactive environment integrating code execution, 3D scene rendering, and execution feedback. The same harness supports trajectory synthesis, agentic reinforcement learning, and inference.\n\nVideo-Coder is trained with supervised fine-tuning followed by **harness-native agentic reinforcement learning** with dual reward feedback. \n\n## 🔥 News\n\n- [2026\u002F11\u002F08] We release the code, model, data of Video-Coder\n\n## 📍 Feature\n\n- Support Qwen3.5 Training\n- Support different Video generators  \n- Full training pipline for coding agent (SFT and RL)\n\n\n\n## 🏆 Performance\n\n### PhyGenBench\n\n**Video-Coder-9B + MiniMax-H3** achieves an average score of **0.67**, compared with **0.61** for MiniMax-H3 alone. It obtains scores of **0.68 \u002F 0.79 \u002F 0.60 \u002F 0.61** on Mechanics, Optics, Thermal, and Material, respectively.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Ftable1.png\" alt=\"PhyGenBench results\" width=\"100%\">\n\u003C\u002Fdiv>\n\n### VBench-2.0\n\n**Video-Coder-9B + MiniMax-H3** achieves an average score of **78.19%**, improving over MiniMax-H3 (**54.58%**) by **23.61 percentage points**. Its Mechanics score reaches **88.67%**, and its Thermotics score reaches **70.88%**.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Ftable2.png\" alt=\"VBench-2.0 results\" width=\"100%\">\n\u003C\u002Fdiv>\n\n## 🎥 Qualitative Results\n\nVideo-Coder constructs draft videos that guide the generated videos through explicit object layout, motion, and camera control. The examples below show vehicles, human actions, and object interactions.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fqualitative.png\" alt=\"Prompts, draft videos, and generated videos\" width=\"100%\">\n\u003C\u002Fdiv>\n\n\n## 🚀 Training\n\n### Setup\n\n```bash\n# 1. Clone the repository\ngit clone https:\u002F\u002Fgithub.com\u002FCYWang735\u002FVideo-Coder.git\ncd Video-Coder\n\n# build SFT environment\nconda create -n video-coder-sft python=3.12 -y\nconda activate video-coder-sft\ncd Video-Coder-SFT\u002Fms-swift\npip install -e .\npip install flash-linear-attention      # fast Qwen3.5 linear attention (optional, much faster)\ncd ..\u002F..\n\n# build RL environment\nconda create -n video-coder-rl python=3.12 -y\nconda activate video-coder-rl\ncd Video-Coder-RL\u002Funi-agent\nbash examples\u002Fvideo_coder\u002Fsetup\u002Finstall_env.sh\n```\n\nThe RL stage runs the Video-Coder Harness in an [Apptainer](https:\u002F\u002Fapptainer.org) sandbox. Build the Blender image and the [mini-swe-agent](https:\u002F\u002Fgithub.com\u002FSWE-agent\u002Fmini-swe-agent) tool directory once (needs internet; prefix `FAKEROOT=1` if your cluster builds images with `--fakeroot`). The script also fills their paths into the training and inference task configs.\n\n```bash\ncd Video-Coder-RL\u002Funi-agent\nbash examples\u002Fvideo_coder\u002Fsetup\u002Fbuild_sandbox.sh\n```\n\nDownload the training data from [🤗 Video-Coder\u002FTrain-Data](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FVideo-Coder\u002FTrain-Data) and unzip the ground-truth videos in place, so that the `gt_video` paths in `rl_data.json` resolve. Then put `sft_data.json` under `Video-Coder-SFT\u002Fms-swift\u002Fdata\u002F`.\n\n```bash\nhf download Video-Coder\u002FTrain-Data --repo-type dataset --local-dir data\u002FTrain-Data\ncd data\u002FTrain-Data\u002Fgt_video && unzip -q gt_video.zip && cd -\nmkdir -p Video-Coder-SFT\u002Fms-swift\u002Fdata && cp data\u002FTrain-Data\u002Fsft_data.json Video-Coder-SFT\u002Fms-swift\u002Fdata\u002F\n```\n\n### SFT Training\n\nOur SFT simply follows [ms-swift](https:\u002F\u002Fgithub.com\u002Fmodelscope\u002Fms-swift), using `sft_data.json` (multi-turn Video-Coder Harness trajectories).\n\n```bash\ncd Video-Coder-SFT\u002Fms-swift\nbash examples\u002Ftrain\u002FVideo-Coder\u002Fsft_qwen3_5_full.sh\n```\n\nThe script fully fine-tunes [Qwen\u002FQwen3.5-9B](https:\u002F\u002Fhuggingface.co\u002FQwen\u002FQwen3.5-9B) with a 128k context (sequence parallel 4) on one node with 4 × H100 GPUs. The SFT checkpoint initializes the RL stage.\n\n### RL Training\n\nFirst, convert `rl_data.json` into the training parquet.\n\n```bash\ncd Video-Coder-RL\u002Funi-agent\npython -m uni_agent.tasks.video_coder.preprocess --tasks ..\u002F..\u002Fdata\u002FTrain-Data\u002Frl_data.json \\\n    --out $PWD\u002Fdata\u002Fvideo_coder_train.parquet --require-gt --gt-request-sidecar\n```\n\nLaunch the video generator for the video reward, here we use [MiniMax-H3](https:\u002F\u002Fhuggingface.co\u002FMiniMaxAI\u002FMiniMax-H3) (Ref2VA) served with SGLang. Each server uses 4 GPUs; more servers make each step faster (we used 4).\n\n```bash\ncd Minimax-H3-server\nbash setup_env.sh && bash download_model.sh     # once\nHOST=0.0.0.0 PORT=30011 bash serve.sh\n```\n\nThe draft video of each accepted rollout is turned into a video by MiniMax-H3, and a VLM judge (`qwen3.8-omni-flash` on DashScope) scores it against the ground-truth video. You may also change to other video generators or judges by revising the `video_reward` section of the task config and [`video_reward.py`](.\u002FVideo-Coder-RL\u002Funi-agent\u002Funi_agent\u002Ftasks\u002Fvideo_coder\u002Fvideo_reward.py).\n\nThen, in the task config [`task_config_video_coder_video_reward_apptainer.yaml`](.\u002FVideo-Coder-RL\u002Funi-agent\u002Fexamples\u002Fquickstart\u002Ftraining\u002Ftask_config_video_coder_video_reward_apptainer.yaml), set the launched server URLs in `video_reward.ref2va.base_urls` and a `video_reward.ref2va.shared_dir` visible to the trainer and the servers at the same path (the sandbox paths were filled in by `build_sandbox.sh`). Export your `DASHSCOPE_API_KEY` on every node before starting Ray. Training logs to [wandb](https:\u002F\u002Fwandb.ai) by default: run `wandb login` first, or set `TRAINER_LOGGER=\"['console']\"`. With several nodes, the data, `CKPTS_DIR` and `shared_dir` must be on storage that every node sees.\n\nFinally, start the RL training based on the SFT model. On Slurm clusters, `unset ROCR_VISIBLE_DEVICES` before `ray start` (Ray and vLLM refuse to start with it), and if you use an HTTP proxy, add `127.0.0.1,localhost` and your node names to `no_proxy`.\n\n```bash\ncd Video-Coder-RL\u002Funi-agent\nray start --head            # on the other nodes: ray start --address=\u003Chead>:6379\nMODEL_PATH=\u002Fpath\u002Fto\u002Fsft_checkpoint CKPTS_DIR=\u002Fpath\u002Fto\u002Fckpts \\\nTRAIN_FILE=$PWD\u002Fdata\u002Fvideo_coder_train.parquet TEST_FILE=$PWD\u002Fdata\u002Fvideo_coder_train.parquet \\\nNNODES=2 NGPUS_PER_NODE=4 GATEWAY_COUNT=4 CONCURRENCY=64 \\\nTRAIN_PROMPT_BSZ=8 N_RESP_PER_PROMPT=8 PPO_MINI_BATCH_SIZE=8 NUM_WARMUP_BATCHES=0 \\\nTOTAL_EPOCHS=3 MAX_RESPONSE_LENGTH=114688 SAVE_FREQ=5 \\\nbash examples\u002Fvideo_coder\u002Ftrain_video_coder_rl.sh\n```\n\nWe trained RL on 8 × H100 GPUs (2 nodes), plus 4 GPUs per MiniMax-H3 server.\n\n## 🔮 Inference & Evaluation\n\nPrepare your own prompts in the same format as the training data: a JSON list of `{\"id\": ..., \"prompt\": ...}` (`gt_video` is not needed).\n\nFirst, generate the **Draft Video** for each prompt with the trained Video-Coder in the Video-Coder Harness, using the RL environment and sandbox from [Training](#-training).\n\n```bash\ncd Video-Coder-RL\u002Funi-agent\nray start --head\nMODEL_PATH=\u002Fpath\u002Fto\u002FVideo-Coder-9B DATA=\u002Fpath\u002Fto\u002Fyour_data.json OUT=\u002Fpath\u002Fto\u002Foutput \\\nbash examples\u002Fvideo_coder\u002Finference\u002Frun_inference.sh\n```\n\nEach draft video is written to `\u002Fpath\u002Fto\u002Foutput\u002Fdrafts\u002F\u003Cid>\u002Frender.mp4`, together with the Blender script (`main.py`) that rendered it. A prompt whose script fails is retried (up to 3 attempts), and rerunning the command resumes. The script also writes `\u002Fpath\u002Fto\u002Foutput\u002Fh3_manifest.jsonl` for the next step.\n\nThen, launch [MiniMax-H3](https:\u002F\u002Fhuggingface.co\u002FMiniMaxAI\u002FMiniMax-H3) and turn the draft videos into the **Final Video**.\n\n```bash\ncd Minimax-H3-server\nbash setup_env.sh && bash download_model.sh     # once\nbash run_batch.sh \u002Fpath\u002Fto\u002Foutput\u002Fh3_manifest.jsonl \u002Fpath\u002Fto\u002Foutput\u002Ffinal\n```\n\nThe final videos are written to `\u002Fpath\u002Fto\u002Foutput\u002Ffinal\u002F\u003Cid>.mp4`.\n\n\n## Acknowledgements\n\nWe thank the open-source projects that support this implementation, including [ms-swift](https:\u002F\u002Fgithub.com\u002Fmodelscope\u002Fms-swift), [verl](https:\u002F\u002Fgithub.com\u002Fvolcengine\u002Fverl), [mini-swe-agent](https:\u002F\u002Fgithub.com\u002FSWE-agent\u002Fmini-swe-agent), and [SGLang](https:\u002F\u002Fgithub.com\u002Fsgl-project\u002Fsglang).\n","Video-Coder 是一个面向视频生成的代码驱动型智能体，通过自主编写并执行 Blender Python 脚本构建结构化3D场景，生成具备明确物体布局、运动轨迹与相机控制的‘草稿视频’（Draft Video），为下游视频生成模型提供强结构先验。其核心技术包括统一的可交互执行环境（Video-Coder Harness）、支持监督微调（SFT）与基于执行反馈的代理式强化学习（agentic RL），并兼容多种视频生成后端（如 MiniMax-H3）。适用于物理仿真驱动的视频生成、可控3D内容合成及需高时空精度的科学可视化等场景。",2,"2026-11-24 04:41:14","CREATED_QUERY"]