qpqpqpqpqpqp commited on
Commit
84fa274
·
verified ·
1 Parent(s): 1bb2f87

Delete Junk

Browse files
.ipynb_checkpoints/README-checkpoint.md DELETED
@@ -1,123 +0,0 @@
1
- # FramePack Image Edit Early Lora
2
-
3
- This repository contains the necessary steps and scripts to generate A edit of the Image using a image-to-video model.
4
- The model leverages LoRA (Low-Rank Adaptation) weights and pre-trained components to create Edit Image based on a input Image and textual prompts.
5
-
6
- ## Prerequisites
7
-
8
- Before proceeding, ensure that you have the following installed on your system:
9
-
10
- • **Ubuntu** (or a compatible Linux distribution)
11
- • **Python 3.x**
12
- • **pip** (Python package manager)
13
- • **Git**
14
- • **Git LFS** (Git Large File Storage)
15
- • **FFmpeg**
16
-
17
- ## Installation
18
-
19
- 1. **Update and Install Dependencies**
20
-
21
- ```bash
22
- sudo apt-get update && sudo apt-get install cbm git-lfs ffmpeg
23
- ```
24
-
25
- 2. **Clone the Repository**
26
-
27
- ```bash
28
- git clone https://huggingface.co/svjack/FramePack_Image_Edit_Lora_Early
29
- cd FramePack_Image_Edit_Lora_Early
30
- ```
31
-
32
- 3. **Install Python Dependencies**
33
-
34
- ```bash
35
- pip install torch torchvision
36
- pip install -r requirements.txt
37
- pip install ascii-magic matplotlib tensorboard huggingface_hub datasets
38
- pip install moviepy==1.0.3
39
- pip install sageattention==1.0.6
40
- ```
41
-
42
- 4. **Download Model Weights**
43
-
44
- ```bash
45
- git clone https://huggingface.co/lllyasviel/FramePackI2V_HY
46
- git clone https://huggingface.co/hunyuanvideo-community/HunyuanVideo
47
- git clone https://huggingface.co/Comfy-Org/HunyuanVideo_repackaged
48
- git clone https://huggingface.co/Comfy-Org/sigclip_vision_384
49
- ```
50
-
51
- ## Usage
52
-
53
- To Edit a Image, use the `fpack_generate_video.py` script with the appropriate parameters. Below are examples of how to do it.
54
-
55
-
56
- * 1 Add a cat
57
- - Input
58
-
59
-
60
- ```python
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 xiang_image.jpg \
68
- --prompt "add a cat into the picture" \
69
- --video_size 512 512 --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 --video_sections 1 --output_type latent_images --one_frame_inference zero_post \
73
- --seed 1234 --lora_multiplier 1.0 --lora_weight framepack_edit_output/framepack-edit-lora-000005.safetensors
74
- ```
75
-
76
- - Output
77
-
78
-
79
- * 2 Change Background
80
- - Input
81
-
82
-
83
- ```python
84
- python fpack_generate_video.py \
85
- --dit FramePackI2V_HY/diffusion_pytorch_model-00001-of-00003.safetensors \
86
- --vae HunyuanVideo/vae/diffusion_pytorch_model.safetensors \
87
- --text_encoder1 HunyuanVideo_repackaged/split_files/text_encoders/llava_llama3_fp16.safetensors \
88
- --text_encoder2 HunyuanVideo_repackaged/split_files/text_encoders/clip_l.safetensors \
89
- --image_encoder sigclip_vision_384/sigclip_vision_patch14_384.safetensors \
90
- --image_path wanye.jpg \
91
- --prompt "Change the background into a restaurant in anime style. Keep the character's eye colors and white hair unchanged." \
92
- --video_size 512 512 --fps 30 --infer_steps 25 \
93
- --attn_mode sdpa --fp8_scaled \
94
- --vae_chunk_size 32 --vae_spatial_tile_sample_min_size 128 \
95
- --save_path save --video_sections 1 --output_type latent_images --one_frame_inference zero_post \
96
- --seed 1234 --lora_multiplier 1.0 --lora_weight framepack_edit_output/framepack-edit-lora-000005.safetensors
97
-
98
- ```
99
-
100
- - Output
101
-
102
-
103
- * 3 Place Train into landscape
104
- - Input
105
-
106
- ```python
107
- python fpack_generate_video.py \
108
- --dit FramePackI2V_HY/diffusion_pytorch_model-00001-of-00003.safetensors \
109
- --vae HunyuanVideo/vae/diffusion_pytorch_model.safetensors \
110
- --text_encoder1 HunyuanVideo_repackaged/split_files/text_encoders/llava_llama3_fp16.safetensors \
111
- --text_encoder2 HunyuanVideo_repackaged/split_files/text_encoders/clip_l.safetensors \
112
- --image_encoder sigclip_vision_384/sigclip_vision_patch14_384.safetensors \
113
- --image_path train.jpg \
114
- --prompt "place the train into a beautiful landscape" \
115
- --video_size 512 512 --fps 30 --infer_steps 25 \
116
- --attn_mode sdpa --fp8_scaled \
117
- --vae_chunk_size 32 --vae_spatial_tile_sample_min_size 128 \
118
- --save_path save --video_sections 1 --output_type latent_images --one_frame_inference zero_post \
119
- --seed 1234 --lora_multiplier 1.0 --lora_weight framepack_edit_output/framepack-edit-lora-000005.safetensors
120
- ```
121
-
122
- - Output
123
-