rese1f / StableVideo
- пятница, 25 августа 2023 г. в 00:00:08
[ICCV 2023] StableVideo: Text-driven Consistency-aware Diffusion Video Editing
StableVideo: Text-driven Consistency-aware Diffusion Video Editing
Wenhao Chai, Xun Guo, Gaoang Wang, Yan Lu
ICCV 2023
VRAM (MiB) | |
---|---|
float32 | 29145 |
amp | 23005 |
amp + cpu | 17639 |
amp + cpu + xformers | 14185 |
save_memory
under default setting (e.g. resolution, etc.) in app.py
git clone https://github.com/rese1f/StableVideo.git
conda create -n stablevideo python=3.11
pip install -r requirements.txt
optional but recommanded
pip install xformers
All models and detectors can be downloaded from ControlNet Hugging Face page at Download Link.
Download the example atlas for car-turn, boat, libby, blackswa, bear, bicycle_tali, giraffe, kite-surf, lucia and motorbike at Download Link shared by Text2LIVE authors.
You can also train on your own video following NLA.
And it will create a folder data:
StableVideo
├── ...
├── ckpt
│ ├── cldm_v15.yaml
| ├── dpt_hybrid-midas-501f0c75.pt
│ ├── control_sd15_canny.pth
│ └── control_sd15_depth.pth
├── data
│ └── car-turn
│ ├── checkpoint # NLA models are stored here
│ ├── car-turn # contains video frames
│ ├── ...
│ ├── blackswan
│ ├── ...
└── ...
Run the following command to start. We provide some prompt template to help you achieve better result.
python app.py
the result .mp4
video and keyframe will be stored in the directory ./log
after clicking render
button.
You can also edit the mask region for the foreground atlas as follows.
This implementation is built partly on Text2LIVE and ControlNet.