Thytu commited on
Commit
6c642e9
ยท
verified ยท
0 Parent(s):

initial commit

Browse files
Files changed (2) hide show
  1. .gitattributes +55 -0
  2. README.md +181 -0
.gitattributes ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - text-to-image
4
+ - lora
5
+ - diffusers
6
+ - template:diffusion-lora
7
+ widget:
8
+ - output:
9
+ url: images/_ki-bY_sewZCIApJgDYQv.png
10
+ text: Replace the face with Nicolas Cage's face
11
+ - output:
12
+ url: images/8VjJQRIuk6hOKdVSRQHaN.png
13
+ text: Replace the face with Nicolas Cage's face
14
+ - output:
15
+ url: images/cO-qVnU-o79Zo94LMyF2w.png
16
+ text: Replace the face with Nicolas Cage's face
17
+ - output:
18
+ url: images/HBefBm8iIFcH--IMcipi0.png
19
+ text: Replace the face with Nicolas Cage's face
20
+ - output:
21
+ url: images/leLq1_DkeopjjKybaqKY2.png
22
+ text: Replace the face with Nicolas Cage's face
23
+ base_model: black-forest-labs/FLUX.1-Kontext-dev
24
+ instance_prompt: null
25
+ license: mit
26
+ ---
27
+ # FLUX.1-Kontext-dev-cage-ify
28
+
29
+ <Gallery />
30
+
31
+ ## Model description
32
+
33
+ # ๐ŸŽญ Cage-ify
34
+
35
+ [![Demo](https:&#x2F;&#x2F;img.shields.io&#x2F;badge&#x2F;๐Ÿš€_Try_It_Live-brightgreen)](https:&#x2F;&#x2F;fal.ai&#x2F;models&#x2F;fal-ai&#x2F;image-editing&#x2F;cage-ify)
36
+ [![License: MIT](https:&#x2F;&#x2F;img.shields.io&#x2F;badge&#x2F;License-MIT-yellow.svg)](https:&#x2F;&#x2F;opensource.org&#x2F;licenses&#x2F;MIT)
37
+ [![Twitter](https:&#x2F;&#x2F;img.shields.io&#x2F;twitter&#x2F;url&#x2F;https&#x2F;twitter.com&#x2F;ThytuVDM.svg?style&#x3D;social&amp;label&#x3D;Follow%20%ThytuVDM)](https:&#x2F;&#x2F;twitter.com&#x2F;ThytuVDM)
38
+
39
+ &gt; Transform any face into Nicolas Cage&#39;s face while maintaining the original expression, lighting, and pose.
40
+
41
+ ## ๐ŸŽฏ What is Cage-ify?
42
+
43
+ Cage-ify is a custom LoRA fine-tune of FLUX.1 Kontext that can replace any human face with Nicolas Cage&#39;s face while preserving the original facial expression, lighting conditions, and head positioning.
44
+
45
+ ### โœจ Key Features
46
+
47
+ - **๐ŸŽญ Perfect Face Replacement**: Seamlessly swaps any face with Nicolas Cage
48
+ - **๐ŸŽจ Expression Matching**: Maintains original facial expressions
49
+ - **๐Ÿ’ก Lighting Preservation**: Keeps original lighting and shadows
50
+ - **๐Ÿ“ Pose Retention**: Preserves head position and angle
51
+ - **๐ŸŒ Universal Compatibility**: Works on any photo with a visible face
52
+
53
+ ## ๐Ÿš€ Quick Start
54
+
55
+ ### Try Online (Recommended)
56
+ [**๐ŸŽฎ Try Cage-ify Live โ†’**](https:&#x2F;&#x2F;fal.ai&#x2F;models&#x2F;fal-ai&#x2F;image-editing&#x2F;cage-ify)
57
+
58
+ ### API Usage
59
+ &#x60;&#x60;&#x60;python
60
+ import fal_client
61
+
62
+ def cage_ify_image(image_url):
63
+ result &#x3D; fal_client.submit(
64
+ &quot;fal-ai&#x2F;flux-kontext-lora&quot;,
65
+ arguments&#x3D;{
66
+ &quot;image_url&quot;: image_url,
67
+ &quot;prompt&quot;: &quot;Transform the face into Nicolas Cage&#39;s face&quot;,
68
+ &quot;lora_path&quot;: &quot;your-lora-path-here&quot;
69
+ }
70
+ )
71
+ return result
72
+ &#x60;&#x60;&#x60;
73
+
74
+ ## ๐Ÿ“ธ Examples
75
+
76
+ &lt;div align&#x3D;&quot;center&quot;&gt;
77
+ &lt;table&gt;
78
+ &lt;tbody&gt;
79
+ &lt;tr&gt;
80
+ &lt;td colspan&#x3D;&quot;2&quot; align&#x3D;&quot;center&quot;&gt;Presidential headshot โ†’ President Cage&lt;&#x2F;td&gt;
81
+ &lt;&#x2F;tr&gt;
82
+ &lt;tr&gt;
83
+ &lt;td align&#x3D;&quot;center&quot;&gt;
84
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;res.cloudinary.com&#x2F;aenetworks&#x2F;image&#x2F;upload&#x2F;c_fill,ar_2,w_3840,h_1920,g_auto&#x2F;dpr_auto&#x2F;f_auto&#x2F;q_auto:eco&#x2F;v1&#x2F;gettyimages-71856793?_a&#x3D;BAVAZGDX0s&quot; alt&#x3D;&quot;Original presidential headshot&quot; width&#x3D;&quot;300&quot;&gt;
85
+ &lt;&#x2F;td&gt;
86
+ &lt;td align&#x3D;&quot;center&quot;&gt;
87
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;i.postimg.cc&#x2F;t4N4TQfp&#x2F;HBef-Bm8i-IFc-H-IMcipi0.png&quot; alt&#x3D;&quot;Caged presidential headshot&quot; width&#x3D;&quot;300&quot;&gt;
88
+ &lt;&#x2F;td&gt;
89
+ &lt;&#x2F;tr&gt;
90
+ &lt;tr&gt;
91
+ &lt;td colspan&#x3D;&quot;2&quot; align&#x3D;&quot;center&quot; style&#x3D;&quot;padding-top: 1.5em;&quot;&gt;Family portrait โ†’ The Cage family&lt;&#x2F;td&gt;
92
+ &lt;&#x2F;tr&gt;
93
+ &lt;tr&gt;
94
+ &lt;td align&#x3D;&quot;center&quot;&gt;
95
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;freedphoto.com&#x2F;wp-content&#x2F;uploads&#x2F;05_Freed_FamilyPortraits.png&quot; alt&#x3D;&quot;Original family portrait&quot; width&#x3D;&quot;300&quot;&gt;
96
+ &lt;&#x2F;td&gt;
97
+ &lt;td align&#x3D;&quot;center&quot;&gt;
98
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;i.postimg.cc&#x2F;YSX26NMP&#x2F;c-O-q-Vn-U-o79-Zo94-LMy-F2w.png&quot; alt&#x3D;&quot;Caged family portrait&quot; width&#x3D;&quot;300&quot;&gt;
99
+ &lt;&#x2F;td&gt;
100
+ &lt;&#x2F;tr&gt;
101
+ &lt;tr&gt;
102
+ &lt;td colspan&#x3D;&quot;2&quot; align&#x3D;&quot;center&quot; style&#x3D;&quot;padding-top: 1.5em;&quot;&gt;Mount Rushmore โ†’ Mount Cagemore&lt;&#x2F;td&gt;
103
+ &lt;&#x2F;tr&gt;
104
+ &lt;tr&gt;
105
+ &lt;td align&#x3D;&quot;center&quot;&gt;
106
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;upload.wikimedia.org&#x2F;wikipedia&#x2F;commons&#x2F;thumb&#x2F;8&#x2F;87&#x2F;Mount_Rushmore_detail_view_%28100MP%29.jpg&#x2F;1200px-Mount_Rushmore_detail_view_%28100MP%29.jpg&quot; alt&#x3D;&quot;Mount Rushmore&quot; width&#x3D;&quot;300&quot;&gt;
107
+ &lt;&#x2F;td&gt;
108
+ &lt;td align&#x3D;&quot;center&quot;&gt;
109
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;i.postimg.cc&#x2F;RVf0knL3&#x2F;ki-b-Y-sew-ZCIAp-Jg-DYQv.png&quot; alt&#x3D;&quot;Mount Cagemore&quot; width&#x3D;&quot;300&quot;&gt;
110
+ &lt;&#x2F;td&gt;
111
+ &lt;&#x2F;tr&gt;
112
+ &lt;tr&gt;
113
+ &lt;td colspan&#x3D;&quot;2&quot; align&#x3D;&quot;center&quot; style&#x3D;&quot;padding-top: 1.5em;&quot;&gt;Happy Potter โ†’ The Boy Who Caged&lt;&#x2F;td&gt;
114
+ &lt;&#x2F;tr&gt;
115
+ &lt;tr&gt;
116
+ &lt;td align&#x3D;&quot;center&quot;&gt;
117
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;occ-0-8407-90.1.nflxso.net&#x2F;dnm&#x2F;api&#x2F;v6&#x2F;Z-WHgqd_TeJxSuha8aZ5WpyLcX8&#x2F;AAAABU4M_0ouMw3it5QsXKVM0cS1iy97W8b8ihAihbk0nvfNYRMcGqC1atGJOf_F7vWcI7pA8rMfhNDuaTL4KpxacKqzCU5faUF9EWl7.jpg?r&#x3D;b7d&quot; alt&#x3D;&quot;Harry Potter&quot; width&#x3D;&quot;300&quot;&gt;
118
+ &lt;&#x2F;td&gt;
119
+ &lt;td align&#x3D;&quot;center&quot;&gt;
120
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;i.postimg.cc&#x2F;W4pbqYLr&#x2F;8-Vj-JQRIuk6h-OKd-VSRQHa-N.png&quot; alt&#x3D;&quot;Harry Potter Caged&quot; width&#x3D;&quot;300&quot;&gt;
121
+ &lt;&#x2F;td&gt;
122
+ &lt;&#x2F;tr&gt;
123
+ &lt;tr&gt;
124
+ &lt;td colspan&#x3D;&quot;2&quot; align&#x3D;&quot;center&quot; style&#x3D;&quot;padding-top: 1.5em;&quot;&gt;Uncle Sam โ†’ Uncle Cage&lt;&#x2F;td&gt;
125
+ &lt;&#x2F;tr&gt;
126
+ &lt;tr&gt;
127
+ &lt;td align&#x3D;&quot;center&quot;&gt;
128
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;v3.fal.media&#x2F;files&#x2F;rabbit&#x2F;cJwSIu1EIZVPMngY8-ljg_you-w-background.png&quot; alt&#x3D;&quot;Original Uncle Sam&quot; width&#x3D;&quot;300&quot;&gt;
129
+ &lt;&#x2F;td&gt;
130
+ &lt;td align&#x3D;&quot;center&quot;&gt;
131
+ &lt;img src&#x3D;&quot;https:&#x2F;&#x2F;i.postimg.cc&#x2F;x12dnT66&#x2F;le-Lq1-Dkeopjj-Kybaq-KY2.png&quot; alt&#x3D;&quot;Caged Uncle Sam&quot; width&#x3D;&quot;300&quot;&gt;
132
+ &lt;&#x2F;td&gt;
133
+ &lt;&#x2F;tr&gt;
134
+ &lt;&#x2F;tbody&gt;
135
+ &lt;&#x2F;table&gt;
136
+ &lt;&#x2F;div&gt;
137
+
138
+ ## ๐Ÿ› ๏ธ How It Works
139
+
140
+ ### Training Process
141
+ 1. **Data Collection**: Gathered 100+ high-quality Nicolas Cage images
142
+ 2. **Reverse Engineering**: Used FLUX.1 Kontext to transform Cage faces into diverse other faces
143
+ 3. **Dataset Creation**: Flipped the pairs to create &quot;other face โ†’ Cage&quot; training data
144
+ 4. **LoRA Training**: Fine-tuned FLUX.1 Kontext [dev] using the dataset
145
+
146
+ ## ๐ŸŽจ Use Cases
147
+
148
+ If you really need a reason to why we should Cage-ify everything, here are some:
149
+ - **๐ŸŽฌ Movie Poster Parodies**: Cage-ify your favorite films
150
+ - **๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ Family Photos**: Make everyone in your family look like Nicolas Cage
151
+ - **๐ŸŽจ Art Projects**: Creative digital art and collages
152
+ - **๐Ÿ™ Our True Leader**: Spray the words
153
+
154
+ ## ๐Ÿ™ Acknowledgments
155
+
156
+ - **Black Forest Labs** for creating FLUX.1 Kontext
157
+ - **fal.ai** for providing training and inference infrastructure
158
+ - **Nicolas Cage** for being the One True God of faces
159
+ - **The Internet** for existing
160
+
161
+ ## ๐Ÿ“ž Contact
162
+
163
+ - **Twitter**: [@ThytuVDM](https:&#x2F;&#x2F;twitter.com&#x2F;ThytuVDM)
164
+ - **Issues**: [GitHub Issues](https:&#x2F;&#x2F;github.com&#x2F;Thytu&#x2F;cage-ify&#x2F;issues)
165
+
166
+ ---
167
+
168
+ &lt;div align&#x3D;&quot;center&quot;&gt;
169
+
170
+ **โญ Star this repo if Cage-ify brought joy to your life! โญ**
171
+
172
+ *&quot;I&#39;m gonna steal the Declaration of Independence... and every face on the internet.&quot;* - Nicolas Cage (probably)
173
+
174
+ &lt;&#x2F;div&gt;
175
+
176
+
177
+
178
+ ## Download model
179
+
180
+
181
+ [Download](/Thytu/FLUX.1-Kontext-dev-cage-ify/tree/main) them in the Files & versions tab.