Spaces:
Configuration error
Configuration error
File size: 1,972 Bytes
55c2b1c 09e7c75 02109df ddd1c14 09e7c75 02109df a043943 09e7c75 a043943 02109df 09e7c75 3a73bc7 09e7c75 a064439 09e7c75 55c2b1c 3a73bc7 09e7c75 a064439 3a73bc7 09e7c75 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# VideoGrain: Modulating Space-Time Attention for Multi-Grained Video Editing (ICLR 2025)
## [<a href="https://knightyxp.github.io/VideoGrain_project_page/" target="_blank">Project Page</a>]
[](https://arxiv.org/abs/)
[](https://huggingface.co/spaces/)
[](https://mc-e.github.io/project/ReVideo/)
## βΆοΈ Setup Environment
Our method is tested using cuda12.1, fp16 of accelerator and xformers on a single L40.
```bash
# Step 1: Create and activate Conda environment
conda create -n st-modulator python==3.10
conda activate st-modulator
# Step 2: Install PyTorch, CUDA and Xformers
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=12.1 -c pytorch -c nvidia
pip install --pre -U xformers==0.0.27
# Step 3: Install additional dependencies with pip
pip install -r requirements.txt
```
`xformers` is recommended to save memory and running time.
</details>
You may download all data and checkpoints using the following bash command
```bash
bash download_all.sh
```
## π Prepare all the data
```
gdown https://drive.google.com/file/d/1dzdvLnXWeMFR3CE2Ew0Bs06vyFSvnGXA/view?usp=drive_link
tar -zxvf videograin_data.tar.gz
```
## π₯ ST-Modulator Editing
You could reproduce multi-grained editing results in our teaser by running:
```bash
bash test.sh
#or accelerate launch test.py --config config/run_two_man.yaml
```
<details><summary>The result is saved at `./result` . (Click for directory structure) </summary>
```
result
βββ run_two_man
β βββ infer_samples
β βββ sample
β βββ step_0 # result image folder
β βββ step_0.mp4 # result video
β βββ source_video.mp4 # the input video
```
</details> |