Skip to content

merge sv4d changes: 1. reduce memory consumption (40G -> 20G) and speed up (500s -> 200s) 2. add gradio demo #394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 3, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
- We are releasing **[Stable Video 4D (SV4D)](https://huggingface.co/stabilityai/sv4d)**, a video-to-4D diffusion model for novel-view video synthesis. For research purposes:
- **SV4D** was trained to generate 40 frames (5 video frames x 8 camera views) at 576x576 resolution, given 5 context frames (the input video), and 8 reference views (synthesised from the first frame of the input video, using a multi-view diffusion model like SV3D) of the same size, ideally white-background images with one object.
- To generate longer novel-view videos (21 frames), we propose a novel sampling method using SV4D, by first sampling 5 anchor frames and then densely sampling the remaining frames while maintaining temporal consistency.
- You can run the community-build gradio demo locally by running `python -m scripts.demo.gradio_app_sv4d`.
- Please check our [project page](https://sv4d.github.io), [tech report](https://sv4d.github.io/static/sv4d_technical_report.pdf) and [video summary](https://www.youtube.com/watch?v=RBP8vdAWTgk) for more details.

**QUICKSTART** : `python scripts/sampling/simple_video_sample_4d.py --input_path assets/test_video1.mp4 --output_folder outputs/sv4d` (after downloading [sv4d.safetensors](https://huggingface.co/stabilityai/sv4d) and [sv3d_u.safetensors](https://huggingface.co/stabilityai/sv3d) from HuggingFace into `checkpoints/`)
**QUICKSTART** : `python scripts/sampling/simple_video_sample_4d.py --input_path assets/sv4d_example_video/test_video1.mp4 --output_folder outputs/sv4d` (after downloading [sv4d.safetensors](https://huggingface.co/stabilityai/sv4d) and [sv3d_u.safetensors](https://huggingface.co/stabilityai/sv3d) from HuggingFace into `checkpoints/`)

To run **SV4D** on a single input video of 21 frames:
- Download SV3D models (`sv3d_u.safetensors` and `sv3d_p.safetensors`) from [here](https://huggingface.co/stabilityai/sv3d) and SV4D model (`sv4d.safetensors`) from [here](https://huggingface.co/stabilityai/sv4d) to `checkpoints/`
- Run `python scripts/sampling/simple_video_sample_4d.py --input_path <path/to/video>`
- `input_path` : The input video `<path/to/video>` can be
- a single video file in `gif` or `mp4` format, such as `assets/test_video1.mp4`, or
- a single video file in `gif` or `mp4` format, such as `assets/sv4d_example_video/test_video1.mp4`, or
- a folder containing images of video frames in `.jpg`, `.jpeg`, or `.png` format, or
- a file name pattern matching images of video frames.
- `num_steps` : default is 20, can increase to 50 for better quality but longer sampling time.
Expand Down
Binary file added assets/sv4d_example_video/bunnyman.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/dolphin.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/green_robot.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/guppie_v0.mp4
Binary file not shown.
File renamed without changes.
Binary file added assets/sv4d_example_video/human5.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/human7.mp4
Binary file not shown.
Binary file not shown.
Binary file added assets/sv4d_example_video/lucia_v000.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/monkey.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/pistol_v0.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/snowboard_v000.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/stroller_v000.mp4
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added assets/sv4d_example_video/train_v0.mp4
Binary file not shown.
Binary file added assets/sv4d_example_video/wave_hello.mp4
Binary file not shown.
Loading
Loading