Commit
ยท
6c642e9
verified
ยท
0
Parent(s):
initial commit
Browse files- .gitattributes +55 -0
- 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 |
+
[](https://fal.ai/models/fal-ai/image-editing/cage-ify)
|
| 36 |
+
[](https://opensource.org/licenses/MIT)
|
| 37 |
+
[](https://twitter.com/ThytuVDM)
|
| 38 |
+
|
| 39 |
+
> Transform any face into Nicolas Cage'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'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://fal.ai/models/fal-ai/image-editing/cage-ify)
|
| 57 |
+
|
| 58 |
+
### API Usage
|
| 59 |
+
```python
|
| 60 |
+
import fal_client
|
| 61 |
+
|
| 62 |
+
def cage_ify_image(image_url):
|
| 63 |
+
result = fal_client.submit(
|
| 64 |
+
"fal-ai/flux-kontext-lora",
|
| 65 |
+
arguments={
|
| 66 |
+
"image_url": image_url,
|
| 67 |
+
"prompt": "Transform the face into Nicolas Cage's face",
|
| 68 |
+
"lora_path": "your-lora-path-here"
|
| 69 |
+
}
|
| 70 |
+
)
|
| 71 |
+
return result
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
## ๐ธ Examples
|
| 75 |
+
|
| 76 |
+
<div align="center">
|
| 77 |
+
<table>
|
| 78 |
+
<tbody>
|
| 79 |
+
<tr>
|
| 80 |
+
<td colspan="2" align="center">Presidential headshot โ President Cage</td>
|
| 81 |
+
</tr>
|
| 82 |
+
<tr>
|
| 83 |
+
<td align="center">
|
| 84 |
+
<img src="https://res.cloudinary.com/aenetworks/image/upload/c_fill,ar_2,w_3840,h_1920,g_auto/dpr_auto/f_auto/q_auto:eco/v1/gettyimages-71856793?_a=BAVAZGDX0s" alt="Original presidential headshot" width="300">
|
| 85 |
+
</td>
|
| 86 |
+
<td align="center">
|
| 87 |
+
<img src="https://i.postimg.cc/t4N4TQfp/HBef-Bm8i-IFc-H-IMcipi0.png" alt="Caged presidential headshot" width="300">
|
| 88 |
+
</td>
|
| 89 |
+
</tr>
|
| 90 |
+
<tr>
|
| 91 |
+
<td colspan="2" align="center" style="padding-top: 1.5em;">Family portrait โ The Cage family</td>
|
| 92 |
+
</tr>
|
| 93 |
+
<tr>
|
| 94 |
+
<td align="center">
|
| 95 |
+
<img src="https://freedphoto.com/wp-content/uploads/05_Freed_FamilyPortraits.png" alt="Original family portrait" width="300">
|
| 96 |
+
</td>
|
| 97 |
+
<td align="center">
|
| 98 |
+
<img src="https://i.postimg.cc/YSX26NMP/c-O-q-Vn-U-o79-Zo94-LMy-F2w.png" alt="Caged family portrait" width="300">
|
| 99 |
+
</td>
|
| 100 |
+
</tr>
|
| 101 |
+
<tr>
|
| 102 |
+
<td colspan="2" align="center" style="padding-top: 1.5em;">Mount Rushmore โ Mount Cagemore</td>
|
| 103 |
+
</tr>
|
| 104 |
+
<tr>
|
| 105 |
+
<td align="center">
|
| 106 |
+
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Mount_Rushmore_detail_view_%28100MP%29.jpg/1200px-Mount_Rushmore_detail_view_%28100MP%29.jpg" alt="Mount Rushmore" width="300">
|
| 107 |
+
</td>
|
| 108 |
+
<td align="center">
|
| 109 |
+
<img src="https://i.postimg.cc/RVf0knL3/ki-b-Y-sew-ZCIAp-Jg-DYQv.png" alt="Mount Cagemore" width="300">
|
| 110 |
+
</td>
|
| 111 |
+
</tr>
|
| 112 |
+
<tr>
|
| 113 |
+
<td colspan="2" align="center" style="padding-top: 1.5em;">Happy Potter โ The Boy Who Caged</td>
|
| 114 |
+
</tr>
|
| 115 |
+
<tr>
|
| 116 |
+
<td align="center">
|
| 117 |
+
<img src="https://occ-0-8407-90.1.nflxso.net/dnm/api/v6/Z-WHgqd_TeJxSuha8aZ5WpyLcX8/AAAABU4M_0ouMw3it5QsXKVM0cS1iy97W8b8ihAihbk0nvfNYRMcGqC1atGJOf_F7vWcI7pA8rMfhNDuaTL4KpxacKqzCU5faUF9EWl7.jpg?r=b7d" alt="Harry Potter" width="300">
|
| 118 |
+
</td>
|
| 119 |
+
<td align="center">
|
| 120 |
+
<img src="https://i.postimg.cc/W4pbqYLr/8-Vj-JQRIuk6h-OKd-VSRQHa-N.png" alt="Harry Potter Caged" width="300">
|
| 121 |
+
</td>
|
| 122 |
+
</tr>
|
| 123 |
+
<tr>
|
| 124 |
+
<td colspan="2" align="center" style="padding-top: 1.5em;">Uncle Sam โ Uncle Cage</td>
|
| 125 |
+
</tr>
|
| 126 |
+
<tr>
|
| 127 |
+
<td align="center">
|
| 128 |
+
<img src="https://v3.fal.media/files/rabbit/cJwSIu1EIZVPMngY8-ljg_you-w-background.png" alt="Original Uncle Sam" width="300">
|
| 129 |
+
</td>
|
| 130 |
+
<td align="center">
|
| 131 |
+
<img src="https://i.postimg.cc/x12dnT66/le-Lq1-Dkeopjj-Kybaq-KY2.png" alt="Caged Uncle Sam" width="300">
|
| 132 |
+
</td>
|
| 133 |
+
</tr>
|
| 134 |
+
</tbody>
|
| 135 |
+
</table>
|
| 136 |
+
</div>
|
| 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 "other face โ Cage" 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://twitter.com/ThytuVDM)
|
| 164 |
+
- **Issues**: [GitHub Issues](https://github.com/Thytu/cage-ify/issues)
|
| 165 |
+
|
| 166 |
+
---
|
| 167 |
+
|
| 168 |
+
<div align="center">
|
| 169 |
+
|
| 170 |
+
**โญ Star this repo if Cage-ify brought joy to your life! โญ**
|
| 171 |
+
|
| 172 |
+
*"I'm gonna steal the Declaration of Independence... and every face on the internet."* - Nicolas Cage (probably)
|
| 173 |
+
|
| 174 |
+
</div>
|
| 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.
|