Upload folder using huggingface_hub
Browse files- .gitattributes +8 -0
- README.md +87 -3
- clown.mp4 +3 -0
- girl.mp4 +3 -0
- lora_interpolation_high_noise_final.safetensors +3 -0
- pink_1.png +3 -0
- pink_2.png +3 -0
- pink_3.png +3 -0
- pink_4.png +3 -0
- transition9_1.png +3 -0
- transition9_2.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,11 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
clown.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
girl.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
pink_1.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
pink_2.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
pink_3.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
pink_4.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
transition9_1.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
transition9_2.png filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,87 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Wan2.2 based Transitions and Frames-2-video
|
| 2 |
+
|
| 3 |
+
<div align="center">
|
| 4 |
+
|
| 5 |
+
# 🎬 Morphic Frames to Video
|
| 6 |
+
|
| 7 |
+
### High-quality video generation from image frames using Wan2.2
|
| 8 |
+
|
| 9 |
+
[](https://github.com/morphicfilms/MorphicFrames2Video.git)
|
| 10 |
+
[](https://huggingface.co/morphicmlteam/Wan2.2-I2V-A14B-frames)
|
| 11 |
+
[](https://www.morphic.com)
|
| 12 |
+
|
| 13 |
+
</div>
|
| 14 |
+
|
| 15 |
+
| Video | Input Images & Prompt |
|
| 16 |
+
|-------|----------------------|
|
| 17 |
+
| <video src="clown.mp4" controls width="640"></video> | <img src="transition9_1.png" width="200"> → <img src="transition9_2.png" width="200"><br><br>**Prompt:** "A clown, slowly transforms into a poster."<br><br>**Type:** Two-frame transition |
|
| 18 |
+
| <video src="girl.mp4" controls width="640"></video> | <img src="pink_1.png" width="150"> → <img src="pink_2.png" width="150"> → <img src="pink_3.png" width="150"> → <img src="pink_4.png" width="150"><br><br>**Prompt:** "The animated girl rises up from her chair and waves hi to the camera as the camera zooms in."<br><br>**Type:** Multi-frame interpolation |
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
## Setting up the repository
|
| 22 |
+
|
| 23 |
+
First clone the Morphic Interpolation repo:
|
| 24 |
+
|
| 25 |
+
```
|
| 26 |
+
git clone https://github.com/morphicfilms/frames-to-video.git
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
To install the environment, we recommend following the [Wan2.2 installation guide](https://github.com/Wan-Video/Wan2.2).
|
| 30 |
+
|
| 31 |
+
Or you could alternatively run : `bash setup_env.sh` -> we recommend using the flash-attn version listed in the bash file for hassle free install.
|
| 32 |
+
|
| 33 |
+
## Downloading the weights
|
| 34 |
+
|
| 35 |
+
First: download Wan2.2 I2V weights:
|
| 36 |
+
|
| 37 |
+
```
|
| 38 |
+
huggingface-cli download Wan-AI/Wan2.2-I2V-A14B --local-dir ./Wan2.2-I2V-A14B
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
Second : download the Morphic Frames to Video lora weights :
|
| 42 |
+
|
| 43 |
+
```
|
| 44 |
+
huggingface-cli download morphic/Wan2.2-frames-to-video --local-dir ./morphic-frames-lora-weights
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
## Running Frames to Video
|
| 48 |
+
|
| 49 |
+
For multi node run for 2 frame interpolation :
|
| 50 |
+
|
| 51 |
+
```
|
| 52 |
+
torchrun --nproc_per_node=8 generate.py \
|
| 53 |
+
--task i2v-A14B \
|
| 54 |
+
--size 1280*720 \
|
| 55 |
+
--frame_num 81 \
|
| 56 |
+
--ckpt_dir ./Wan2.2-I2V-A14B-Interpolation \
|
| 57 |
+
--high_noise_lora_weights_path ./morphic-frames-lora-weights/lora_interpolation_high_noise_final.safetensors \
|
| 58 |
+
--dit_fsdp \
|
| 59 |
+
--t5_fsdp \
|
| 60 |
+
--ulysses_size 8 \
|
| 61 |
+
--image examples/transition9_1.png \
|
| 62 |
+
--prompt "Aa clown, slowly transforms into a poster." \
|
| 63 |
+
--img_end examples/transition9_2.png \
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
For multi node run for multi frame interpolation :
|
| 67 |
+
```
|
| 68 |
+
torchrun --nproc_per_node=8 generate.py \
|
| 69 |
+
--task i2v-A14B \
|
| 70 |
+
--size 1280*720 \
|
| 71 |
+
--frame_num 81 \
|
| 72 |
+
--ckpt_dir ./Wan2.2-I2V-A14B-Interpolation \
|
| 73 |
+
--high_noise_lora_weights_path ./morphic-frames-lora-weights/lora_interpolation_high_noise_final.safetensors \
|
| 74 |
+
--dit_fsdp \
|
| 75 |
+
--t5_fsdp \
|
| 76 |
+
--ulysses_size 8 \
|
| 77 |
+
--image examples/pink_1.png \
|
| 78 |
+
--prompt "The animated girl rises up from her chair and waves hi to the camera as the camer zooms in." \
|
| 79 |
+
--img_end examples/pink_4.png \
|
| 80 |
+
--middle_images examples/pink_2.png examples/pink_3.png \
|
| 81 |
+
--middle_images_timestamps 0.4 0.7
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
Note:
|
| 85 |
+
1. --middle_images_timestamps : should be used if multiple intermediate frames are provided, the numbers indicate the the location the intermediate frame is provided (0.5 -> midway, 0.33, 0.66 -> 2 equally spaced intermediate frames, 0.25, 0.5, 0.75 -> 3 equally spaced intermediate frames)
|
| 86 |
+
2. Number of middle_images must be equal to number of middle_images_timestamps
|
| 87 |
+
|
clown.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:284730e2fd413de6b9dae9cdb4c2445ab873be11561f368f0e30cf3d4a9c0cc7
|
| 3 |
+
size 6158234
|
girl.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd071c591ff6e78e57e2792ef0552c653f29fb934a442b9079caa22c89f2b1ee
|
| 3 |
+
size 5119792
|
lora_interpolation_high_noise_final.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cb9c4c225ec5b7e941cd0b726d4af48710e9d63a1e83c596d597de4a79db819c
|
| 3 |
+
size 419499992
|
pink_1.png
ADDED
|
Git LFS Details
|
pink_2.png
ADDED
|
Git LFS Details
|
pink_3.png
ADDED
|
Git LFS Details
|
pink_4.png
ADDED
|
Git LFS Details
|
transition9_1.png
ADDED
|
Git LFS Details
|
transition9_2.png
ADDED
|
Git LFS Details
|