Views
No views yet
diffusers library (requires appropriate model weights and dependencies):1from diffusers import DiffusionPipeline #Import necessary libraries
2# Load the model (replace with your actual paths)
3pipe = DiffusionPipeline.from_pretrained("suimu/VIRES", torch_dtype=torch.float16).to("cuda")
4
5# Prepare inputs: text prompt, mask, and sketch
6prompt = "A cat replaces the dog in this video"
7mask = ... #Load your mask sequence
8sketch = ... #Load your sketch sequence
9
10# Generate the video
11video = pipe(prompt, mask, sketch).videos[0]
12
13# Save or display the video
14...1@article{vires,
2 title={VIRES: Video Instance Repainting via Sketch and Text Guided Generation},
3 author={Weng, Shuchen and Zheng, Haojie and Zhang, Peixuan and Hong, Yuchen and Jiang, Han and Li, Si and Shi, Boxin},
4 journal={arXiv preprint arXiv:2411.16199},
5 year={2024}
6}