.ipynb_checkpoints/README-checkpoint.md DELETED
@@ -1,203 +0,0 @@
1
- # FramePack Dancing Image-to-Video Generation
2
-
3
- This repository contains the necessary steps and scripts to generate videos using the Dancing image-to-video model. The model leverages LoRA (Low-Rank Adaptation) weights and pre-trained components to create high-quality anime-style videos based on textual prompts.
4
-
5
- ## Prerequisites
6
-
7
- Before proceeding, ensure that you have the following installed on your system:
8
-
9
- • **Ubuntu** (or a compatible Linux distribution)
10
- • **Python 3.x**
11
- • **pip** (Python package manager)
12
- • **Git**
13
- • **Git LFS** (Git Large File Storage)
14
- • **FFmpeg**
15
-
16
- ## Installation
17
-
18
- 1. **Update and Install Dependencies**
19
-
20
- ```bash
21
- sudo apt-get update && sudo apt-get install cbm git-lfs ffmpeg
22
- ```
23
-
24
- 2. **Clone the Repository**
25
-
26
- ```bash
27
- git clone https://huggingface.co/svjack/YiChen_FramePack_lora_early
28
- cd YiChen_FramePack_lora_early
29
- ```
30
-
31
- 3. **Install Python Dependencies**
32
-
33
- ```bash
34
- pip install torch torchvision
35
- pip install -r requirements.txt
36
- pip install ascii-magic matplotlib tensorboard huggingface_hub datasets
37
- pip install moviepy==1.0.3
38
- pip install sageattention==1.0.6
39
- ```
40
-
41
- 4. **Download Model Weights**
42
-
43
- ```bash
44
- git clone https://huggingface.co/lllyasviel/FramePackI2V_HY
45
- git clone https://huggingface.co/hunyuanvideo-community/HunyuanVideo
46
- git clone https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged
47
- git clone https://huggingface.co/Comfy-Org/sigclip_vision_384
48
- ```
49
-
50
- ## Usage
51
-
52
- To generate a video, use the `fpack_generate_video.py` script with the appropriate parameters. Below are examples of how to generate videos using the Dancing model.
53
-
54
-
55
-
56
- ### 1. Furina
57
- - Source Image
58
-
59
-
60
- ```bash
61
- python fpack_generate_video.py \
62
- --dit FramePackI2V_HY/diffusion_pytorch_model-00001-of-00003.safetensors \
63
- --vae HunyuanVideo/vae/diffusion_pytorch_model.safetensors \
64
- --text_encoder1 HunyuanVideo_repackaged/split_files/text_encoders/llava_llama3_fp16.safetensors \
65
- --text_encoder2 HunyuanVideo_repackaged/split_files/text_encoders/clip_l.safetensors \
66
- --image_encoder sigclip_vision_384/sigclip_vision_patch14_384.safetensors \
67
- --image_path fln.png \
68
- --prompt "In the style of Yi Chen Dancing White Background , The character's movements shift dynamically throughout the video, transitioning from poised stillness to lively dance steps. Her expressions evolve seamlessly—starting with focused determination, then flashing surprise as she executes a quick spin, before breaking into a joyful smile mid-leap. Her hands flow through choreographed positions, sometimes extending gracefully like unfolding wings, other times clapping rhythmically against her wrists. During a dramatic hip sway, her fingers fan open near her cheek, then sweep downward as her whole body dips into a playful crouch, the sequins on her costume catching the light with every motion." \
69
- --video_size 960 544 --video_seconds 3 --fps 30 --infer_steps 25 \
70
- --attn_mode sdpa --fp8_scaled \
71
- --vae_chunk_size 32 --vae_spatial_tile_sample_min_size 128 \
72
- --save_path save --output_type both \
73
- --seed 1234 --lora_multiplier 1.0 --lora_weight framepack_yichen_output/framepack-yichen-lora-000006.safetensors
74
-
75
-
76
- ```
77
-
78
- - Without Lora
79
-
80
- - With Lora
81
-
82
-
83
- ### 2. Roper
84
- - Source Image
85
-
86
-
87
-
88
- ```bash
89
- python fpack_generate_video.py \
90
- --dit FramePackI2V_HY/diffusion_pytorch_model-00001-of-00003.safetensors \
91
- --vae HunyuanVideo/vae/diffusion_pytorch_model.safetensors \
92
- --text_encoder1 HunyuanVideo_repackaged/split_files/text_encoders/llava_llama3_fp16.safetensors \
93
- --text_encoder2 HunyuanVideo_repackaged/split_files/text_encoders/clip_l.safetensors \
94
- --image_encoder sigclip_vision_384/sigclip_vision_patch14_384.safetensors \
95
- --image_path shengjiang.png \
96
- --prompt "In the style of Yi Chen Dancing White Background , The character's movements shift dynamically throughout the video, transitioning from poised stillness to lively dance steps. Her expressions evolve seamlessly—starting with focused determination, then flashing surprise as she executes a quick spin, before breaking into a joyful smile mid-leap. Her hands flow through choreographed positions, sometimes extending gracefully like unfolding wings, other times clapping rhythmically against her wrists. During a dramatic hip sway, her fingers fan open near her cheek, then sweep downward as her whole body dips into a playful crouch, the sequins on her costume catching the light with every motion." \
97
- --video_size 960 544 --video_seconds 3 --fps 30 --infer_steps 25 \
98
- --attn_mode sdpa --fp8_scaled \
99
- --vae_chunk_size 32 --vae_spatial_tile_sample_min_size 128 \
100
- --save_path save --output_type both \
101
- --seed 1234 --lora_multiplier 1.0 --lora_weight framepack_yichen_output/framepack-yichen-lora-000006.safetensors
102
-
103
- ```
104
-
105
- - With Lora
106
-
107
-
108
-
109
- ### 3. Varesa
110
- - Source Image
111
-
112
-
113
- ```bash
114
- python fpack_generate_video.py \
115
- --dit FramePackI2V_HY/diffusion_pytorch_model-00001-of-00003.safetensors \
116
- --vae HunyuanVideo/vae/diffusion_pytorch_model.safetensors \
117
- --text_encoder1 HunyuanVideo_repackaged/split_files/text_encoders/llava_llama3_fp16.safetensors \
118
- --text_encoder2 HunyuanVideo_repackaged/split_files/text_encoders/clip_l.safetensors \
119
- --image_encoder sigclip_vision_384/sigclip_vision_patch14_384.safetensors \
120
- --image_path waliesha.jpg \
121
- --prompt "In the style of Yi Chen Dancing White Background , The dancer’s energy pulses in waves—one moment a statue, poised and precise, the next a whirl of motion as her feet flicker across the floor. Her face tells its own story: brows knit in concentration, then eyes widening mid-turn as if startled by her own speed, before dissolving into laughter as she springs upward, weightless. Her arms carve the air—now arcing like ribbons unfurling, now snapping sharp as a whip’s crack, palms meeting wrists in staccato beats. A roll of her hips sends her fingers fluttering near her temple, then cascading down as she folds into a teasing dip, the beads on her dress scattering light like sparks." \
122
- --video_size 960 544 --video_seconds 3 --fps 30 --infer_steps 25 \
123
- --attn_mode sdpa --fp8_scaled \
124
- --vae_chunk_size 32 --vae_spatial_tile_sample_min_size 128 \
125
- --save_path save --output_type both \
126
- --seed 1234 --lora_multiplier 1.0 --lora_weight framepack_yichen_output/framepack-yichen-lora-000006.safetensors
127
-
128
- ```
129
- - With Lora
130
-
131
-
132
-
133
- ### 4. Scaramouche
134
- - Source Image
135
-
136
-
137
- ```bash
138
- python fpack_generate_video.py \
139
- --dit FramePackI2V_HY/diffusion_pytorch_model-00001-of-00003.safetensors \
140
- --vae HunyuanVideo/vae/diffusion_pytorch_model.safetensors \
141
- --text_encoder1 HunyuanVideo_repackaged/split_files/text_encoders/llava_llama3_fp16.safetensors \
142
- --text_encoder2 HunyuanVideo_repackaged/split_files/text_encoders/clip_l.safetensors \
143
- --image_encoder sigclip_vision_384/sigclip_vision_patch14_384.safetensors \
144
- --image_path shanbing.jpg \
145
- --prompt "In the style of Yi Chen Dancing White Background , The dancer’s energy pulses in waves—one moment a statue, poised and precise, the next a whirl of motion as her feet flicker across the floor. Her face tells its own story: brows knit in concentration, then eyes widening mid-turn as if startled by her own speed, before dissolving into laughter as she springs upward, weightless. Her arms carve the air—now arcing like ribbons unfurling, now snapping sharp as a whip’s crack, palms meeting wrists in staccato beats. A roll of her hips sends her fingers fluttering near her temple, then cascading down as she folds into a teasing dip, the beads on her dress scattering light like sparks." \
146
- --video_size 960 544 --video_seconds 3 --fps 30 --infer_steps 25 \
147
- --attn_mode sdpa --fp8_scaled \
148
- --vae_chunk_size 32 --vae_spatial_tile_sample_min_size 128 \
149
- --save_path save --output_type both \
150
- --seed 1234 --lora_multiplier 1.0 --lora_weight framepack_yichen_output/framepack-yichen-lora-000006.safetensors
151
-
152
- ```
153
-
154
- - With Lora
155
-
156
-
157
-
158
-
159
- ## Parameters
160
-
161
- * `--fp8`: Enable FP8 precision (optional).
162
- * `--task`: Specify the task (e.g., `t2v-1.3B`).
163
- * `--video_size`: Set the resolution of the generated video (e.g., `1024 1024`).
164
- * `--video_length`: Define the length of the video in frames.
165
- * `--infer_steps`: Number of inference steps.
166
- * `--save_path`: Directory to save the generated video.
167
- * `--output_type`: Output type (e.g., `both` for video and frames).
168
- * `--dit`: Path to the diffusion model weights.
169
- * `--vae`: Path to the VAE model weights.
170
- * `--t5`: Path to the T5 model weights.
171
- * `--attn_mode`: Attention mode (e.g., `torch`).
172
- * `--lora_weight`: Path to the LoRA weights.
173
- * `--lora_multiplier`: Multiplier for LoRA weights.
174
- * `--prompt`: Textual prompt for video generation.
175
-
176
-
177
-
178
- ## Output
179
-
180
- The generated video and frames will be saved in the specified `save_path` directory.
181
-
182
- ## Troubleshooting
183
-
184
- • Ensure all dependencies are correctly installed.
185
- • Verify that the model weights are downloaded and placed in the correct locations.
186
- • Check for any missing Python packages and install them using `pip`.
187
-
188
- ## License
189
-
190
- This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
191
-
192
- ## Acknowledgments
193
-
194
- • **Hugging Face** for hosting the model weights.
195
- • **Wan-AI** for providing the pre-trained models.
196
- • **DeepBeepMeep** for contributing to the model weights.
197
-
198
- ## Contact
199
-
200
- For any questions or issues, please open an issue on the repository or contact the maintainer.
201
-
202
- ---
203
-