Adi-Iyer commited on
Commit
02cf7a6
·
verified ·
1 Parent(s): ed06dfb

Upload folder using huggingface_hub

Browse files
.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
- license: apache-2.0
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
+ [![GitHub](https://img.shields.io/badge/GitHub-Morphic%20Frames-black?logo=github)](https://github.com/morphicfilms/MorphicFrames2Video.git)
10
+ [![Hugging Face](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Morphic%20Frames-blue)](https://huggingface.co/morphicmlteam/Wan2.2-I2V-A14B-frames)
11
+ [![Website](https://img.shields.io/badge/Website-morphic.com-purple)](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

  • SHA256: 3541f79e862c027824229c6a6a7f9534ea15a8b1d1b28b64918c1622ff593941
  • Pointer size: 131 Bytes
  • Size of remote file: 719 kB
pink_2.png ADDED

Git LFS Details

  • SHA256: 08bfc07f4d70ae8a130f3c2471e63089f5925299fa8a09c3f240ba4f34fcd59b
  • Pointer size: 132 Bytes
  • Size of remote file: 1.27 MB
pink_3.png ADDED

Git LFS Details

  • SHA256: ffb9611d9acf2d8a025d58d3dc76e6bf819aaf29384a432620c5683ca1639d4c
  • Pointer size: 132 Bytes
  • Size of remote file: 1.6 MB
pink_4.png ADDED

Git LFS Details

  • SHA256: d8dfefb9a8cd0bff9765b1e4aec896c00066ff3e12f6a57a1010479ae467b3a5
  • Pointer size: 132 Bytes
  • Size of remote file: 1.67 MB
transition9_1.png ADDED

Git LFS Details

  • SHA256: 9e6174f297d0227562a441c92826712f83866403b32de1b2e2b627e70c9324e7
  • Pointer size: 131 Bytes
  • Size of remote file: 593 kB
transition9_2.png ADDED

Git LFS Details

  • SHA256: 96fe864f30452c78fe9cb63cc85d7142d063c3fe14e3c69bd6e56af09bd4fcd6
  • Pointer size: 131 Bytes
  • Size of remote file: 473 kB