Video-As-Prompt: Unified Semantic Control for Video Generation
🔥 News
Oct 24, 2025: 📖 We release the first unified semantic video generation model, Video-As-Prompt (VAP)!
Oct 24, 2025: 🤗 We release the VAP-Data, the largest semantic-controlled video generation datasets with more than $100K$ samples!
Oct 24, 2025: 👋 We present the technical report of Video-As-Prompt, please check out the details and spark some discussion!
🖌️ Video-As-Prompt
Core idea: Given a reference video with wanted semantics as a video prompt, Video-As-Prompt animate a reference image with the same semantics as the reference video.
E.g., Different Reference Videos + Same Reference Image → New Videos with Different Semantics
Welcome to see our project page for more interesting results!
🎁 Models Zoo
To demonstrate cross-architecture generality, Video-As-Prompt provides two variants, each with distinct trade-offs:
CogVideoX-I2V-5B
Strengths: Fewer backbone parameters let us train more steps under limited resources, yielding strong stability on most semantic conditions.
Limitations: Due to backbone ability limitation, it is weaker on human-centric generation and on concepts underrepresented in pretraining (e.g., ladudu, Squid Game, Minecraft).
Wan2.1-I2V-14B
Strengths: Strong performance on human actions and novel concepts, thanks to a more capable base model.
Limitations: Larger model size reduced feasible training steps given our resources, lowering stability on some semantic conditions.
👏👏👏 Contributions and further optimization from the community are welcome.
We have published the VAP-Data dataset used in our paper on VAP-Data. Please download it and put it in the data folder. The structure should look like:
We mainly implement our code based on diffusers and finetrainers for their modular design.
Minimal Demo
Below is a minimal demo of our CogVideoX-I2V-5B variant. The full code can be found in infer/cog_vap.py. The WAN2.1-I2V-14B variant is similar and can be found in infer/wan_vap.py.
python
1import torch
2from diffusers import(3 AutoencoderKLCogVideoX,4 CogVideoXImageToVideoMOTPipeline,5 CogVideoXTransformer3DMOTModel,6)7from diffusers.utils import export_to_video, load_video
8from PIL import Image
910vae = AutoencoderKLCogVideoX.from_pretrained("ByteDance/Video-As-Prompt-CogVideoX-5B", subfolder="vae", torch_dtype=torch.bfloat16)11transformer = CogVideoXTransformer3DMOTModel.from_pretrained("ByteDance/Video-As-Prompt-CogVideoX-5B", torch_dtype=torch.bfloat16)12pipe = CogVideoXImageToVideoMOTPipeline.from_pretrained(13"ByteDance/Video-As-Prompt-CogVideoX-5B", vae=vae, transformer=transformer, torch_dtype=torch.bfloat16
14).to("cuda")1516ref_video = load_video("assets/videos/demo/object-725.mp4")17image = Image.open("assets/images/demo/animal-2.jpg").convert("RGB")18idx = torch.linspace(0,len(ref_video)-1,49).long().tolist()19ref_frames =[ref_video[i]for i in idx]2021output_frames = pipe(22 image=image,23 ref_videos=[ref_frames],24 prompt="A chestnut-colored horse stands on a grassy hill against a backdrop of distant, snow-dusted mountains. The horse begins to inflate, its defined, muscular body swelling and rounding into a smooth, balloon-like form while retaining its rich, brown hide color. Without changing its orientation, the now-buoyant horse lifts silently from the ground. It begins a steady vertical ascent, rising straight up and eventually floating out of the top of the frame. The camera remains completely static throughout the entire sequence, holding a fixed shot on the landscape as the horse transforms and departs, ensuring the verdant hill and mountain range in the background stay perfectly still.",25 prompt_mot_ref=[26"A hand holds up a single beige sneaker decorated with gold calligraphy and floral illustrations, with small green plants tucked inside. The sneaker immediately begins to inflate like a balloon, its shape distorting as the decorative details stretch and warp across the expanding surface. It rapidly transforms into a perfectly smooth, matte beige sphere, inheriting the primary color from the original shoe. Once the transformation is complete, the new balloon-like object quickly ascends, moving straight up and exiting the top of the frame. The camera remains completely static and the plain white background is unchanged throughout the entire sequence."27],28 height=480,29 width=720,30 num_frames=49,31 frames_selection="evenly",32 use_dynamic_cfg=True,33).frames[0]
Benchmark Inference
You can alse refer the following code for benchmark inference. Then you can use Vbench to evaluate the results.
CogVideoX supports SFT, DPO, and a ≤3-reference SFT variant; Wan currently supports standard SFT only.
All scripts read shared config (datasets, output dir, batch size, etc.); edit the script to override.
Please edit train_multi_node*.sh base on your environment if you want to change the distributed settings (e.g., gpu num, node num, master addr/port, etc.).
🔗 BibTeX
❤️ If you found this repository helpful, please give us a star and cite our report:
bibtex
1@article{bian2025videoasprompt,
2 title = {Video-As-Prompt: Unified Semantic Control for Video Generation},
3 author = {Yuxuan Bian and Xin Chen and Zenan Li and Tiancheng Zhi and Shen Sang and Linjie Luo and Qiang Xu},
4 journal = {arXiv preprint arXiv:2510.20888},
5 year = {2025},
6 url = {https://arxiv.org/abs/2510.20888}
7}
Acknowledgements
We would like to thank the contributors to the Finetrainers, Diffusers, CogVideoX, and Wan repositories, for their open research and exploration.