Initial commit
Browse filesCo-authored-by: jindidi <jindidi@users.noreply.huggingface.co>
Co-authored-by: kuan-wang <kuan-wang@users.noreply.huggingface.co>
- .gitattributes +53 -0
- README.md +507 -0
- assets/example1-eigen-banana.png +3 -0
- assets/example1-input.png +3 -0
- assets/example1-qwen-image-edit.png +3 -0
- assets/example2-eigen-banana.png +3 -0
- assets/example2-input.png +3 -0
- assets/example2-qwen-image-edit.png +3 -0
- assets/example3-eigen-banana.png +3 -0
- assets/example3-input.png +3 -0
- assets/example3-qwen-image-edit.png +3 -0
- assets/example4-eigen-banana.png +3 -0
- assets/example4-input.png +3 -0
- assets/example4-qwen-image-edit.png +3 -0
- assets/example5-eigen-banana.png +3 -0
- assets/example5-input.png +3 -0
- assets/example5-qwen-image-edit.png +3 -0
- eigen-banana-qwen-image-edit-fp16-lora.safetensors +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz 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 |
+
assets[[:space:]]/example1-eigen-banana.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets[[:space:]]/example1-input.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets[[:space:]]/example1-qwen-image-edit.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
assets/example1-eigen-banana.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
assets/example1-input.png filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
assets/example1-qwen-image-edit.png filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
assets/example2-eigen-banana.png filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
assets/example2-input.png filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
assets/example2-qwen-image-edit.png filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
assets/example3-eigen-banana.png filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
assets/example3-input.png filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
assets/example3-qwen-image-edit.png filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
assets/example4-eigen-banana.png filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
assets/example4-input.png filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
assets/example4-qwen-image-edit.png filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
assets/example5-eigen-banana.png filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
assets/example5-input.png filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
assets/example5-qwen-image-edit.png filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,507 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
+
|
| 14 |
+
# Eigen-Banana-Qwen-Image-Edit: Fast Image Editing with Qwen-Image-Edit LoRA
|
| 15 |
+
|
| 16 |
+
⚡ [**Lightning Demo Website**](https://app.eigenai.com/eigen-banana-qwen-image-edit.html) / 📄 [**Blog Post**](https://www.eigenai.com/blog/2025-10-30-eigen-banana.html)
|
| 17 |
+
|
| 18 |
+
**Eigen-Banana-Qwen-Image-Edit** is a LoRA (Low-Rank Adaptation) checkpoint for the Qwen-Image-Edit model, optimized for fast, high-quality image editing with text prompts. This model enables efficient text-guided image transformations with reduced inference steps while maintaining excellent quality.
|
| 19 |
+
|
| 20 |
+
Trained on the **[Pico-Banana-400K](https://github.com/apple/pico-banana-400k)** dataset from Apple—a large-scale collection of ~400K text–image–edit triplets covering 35 edit operations across diverse semantic categories—Eigen-Banana-Qwen-Image-Edit excels at a wide range of editing tasks from object manipulation to stylistic transformations.
|
| 21 |
+
|
| 22 |
+
## Model Details
|
| 23 |
+
|
| 24 |
+
- **Base Model**: Qwen/Qwen-Image-Edit
|
| 25 |
+
- **Model Type**: LoRA Fine-tuned Diffusion Transformer
|
| 26 |
+
- **Training Dataset**: [Pico-Banana-400K](https://github.com/apple/pico-banana-400k)
|
| 27 |
+
- **Training Method**: EigenTrain (LoRA fine-tuning)
|
| 28 |
+
- **Format**: FP16 SafeTensors
|
| 29 |
+
- **License**: Apache 2.0
|
| 30 |
+
- **Use Cases**: Text-guided image editing, style transfer, object modification, scene transformation
|
| 31 |
+
|
| 32 |
+
## Features
|
| 33 |
+
|
| 34 |
+
✨ **Fast Inference**: Optimized for quick generation with distilled knowledge
|
| 35 |
+
🎨 **High Quality**: Maintains excellent visual quality with fewer steps
|
| 36 |
+
🌐 **Multilingual**: Supports both English and Chinese prompts
|
| 37 |
+
⚡ **Efficient**: Lightweight LoRA weights for easy deployment
|
| 38 |
+
|
| 39 |
+
## Training Dataset
|
| 40 |
+
|
| 41 |
+
This model was trained on **[Pico-Banana-400K](https://github.com/apple/pico-banana-400k)**, a large-scale dataset of ~400K text–image–edit triplets designed for text-guided image editing research.
|
| 42 |
+
|
| 43 |
+
### Dataset Highlights
|
| 44 |
+
|
| 45 |
+
- **~257K single-turn text–image–edit triplets** for supervised fine-tuning
|
| 46 |
+
- **35 edit operations** across **8 semantic categories**:
|
| 47 |
+
- Object-Level Semantic (35%): Add, remove, replace, or relocate objects
|
| 48 |
+
- Scene Composition & Multi-Subject (20%): Contextual transformations
|
| 49 |
+
- Human-Centric (18%): Clothing, expression, appearance edits
|
| 50 |
+
- Stylistic (10%): Domain and artistic style transfer
|
| 51 |
+
- Text & Symbol (8%): Edits involving visible text or signs
|
| 52 |
+
- Pixel & Photometric (5%): Brightness, contrast, tonal adjustments
|
| 53 |
+
- Scale & Perspective (2%): Zoom, viewpoint changes
|
| 54 |
+
- Spatial/Layout (2%): Outpainting, composition extension
|
| 55 |
+
|
| 56 |
+
- **Source Images**: [Open Images Dataset](https://storage.googleapis.com/openimages/web/index.html)
|
| 57 |
+
- **Instruction Generation**: Gemini-2.5-Flash for natural-language editing prompts
|
| 58 |
+
- **Quality Control**: Automated self-evaluation using Gemini-2.5-Pro
|
| 59 |
+
|
| 60 |
+
### Training Methodology
|
| 61 |
+
|
| 62 |
+
The model was fine-tuned using **EigenTrain**, a training platform that unifies SFT, offline RL, and online RL for training text LLMs and VLMs, and includes first-class workflows for multimodal image/video generation. Here, we used EigenTrain to do LoRA fine-tuning on Qwen-Image-Edit. Key training parameters:
|
| 63 |
+
|
| 64 |
+
- **LoRA Rank**: 32
|
| 65 |
+
- **Target Modules**: `to_q`, `to_k`, `to_v`, `add_q_proj`, `add_k_proj`, `add_v_proj`, `to_out.0`, `to_add_out`, `img_mlp.net.2`, `img_mod.1`, `txt_mlp.net.2`, `txt_mod.1`
|
| 66 |
+
- **Learning Rate**: 1e-4
|
| 67 |
+
- **Training Data**: ~257K high-quality text-image-edit triplets
|
| 68 |
+
- **Precision**: FP16 for efficient deployment
|
| 69 |
+
|
| 70 |
+
This combination of high-quality training data and efficient LoRA adaptation enables fast, accurate image editing while maintaining the base model's strong capabilities.
|
| 71 |
+
|
| 72 |
+
## Demo Images
|
| 73 |
+
|
| 74 |
+
We present several examples to qualitatively compare the original qwen-image-edit and our eigen-banana-qwen-image-edit.
|
| 75 |
+
|
| 76 |
+
### Example 1 – Add a new object to the scene
|
| 77 |
+
|
| 78 |
+
<!-- Input (moderate width, centered) -->
|
| 79 |
+
<p align="center">
|
| 80 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example1-input.png"
|
| 81 |
+
alt="example1-input"
|
| 82 |
+
width="360">
|
| 83 |
+
</p>
|
| 84 |
+
|
| 85 |
+
**Prompt:** Integrate a minimalist, dark-toned, rectangular gallery bench into the mid-ground, positioned slightly to the right of the central pillar and facing the right wall, ensuring its texture, lighting, and subtle shadows are consistent with the existing black and white aesthetic and diffused ambient light of the art gallery.
|
| 86 |
+
|
| 87 |
+
**Outputs**
|
| 88 |
+
|
| 89 |
+
<!-- Two-up grid with captions (works on HF + GitHub) -->
|
| 90 |
+
<table>
|
| 91 |
+
<tr>
|
| 92 |
+
<td align="center" width="50%">
|
| 93 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example1-qwen-image-edit.png"
|
| 94 |
+
alt="example1-qwen-image-edit"
|
| 95 |
+
width="100%"><br/>
|
| 96 |
+
<h5><b>Qwen-Image-Edit</b></h5>
|
| 97 |
+
</td>
|
| 98 |
+
<td align="center" width="50%">
|
| 99 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example1-eigen-banana.png"
|
| 100 |
+
alt="example1-eigen-banana"
|
| 101 |
+
width="100%"><br/>
|
| 102 |
+
<h5><b>Eigen-Banana (⚡Lightning)</b></h5>
|
| 103 |
+
</td>
|
| 104 |
+
</tr>
|
| 105 |
+
</table>
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
### Example 2 – Add a film grain/filter
|
| 109 |
+
|
| 110 |
+
<!-- Input (moderate width, centered) -->
|
| 111 |
+
<p align="center">
|
| 112 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example2-input.png"
|
| 113 |
+
alt="example2-input"
|
| 114 |
+
width="360">
|
| 115 |
+
</p>
|
| 116 |
+
|
| 117 |
+
**Prompt:** Apply a vintage film aesthetic to the image, featuring a subtle desaturation of colors with a warm, golden-hour tone, introduce a fine and natural-looking film grain across the entire scene, gently reduce overall contrast for a softer appearance, and add a very faint, dark vignette to the edges to mimic an aged photographic print.
|
| 118 |
+
|
| 119 |
+
**Outputs**
|
| 120 |
+
|
| 121 |
+
<!-- Two-up grid with captions (works on HF + GitHub) -->
|
| 122 |
+
<table>
|
| 123 |
+
<tr>
|
| 124 |
+
<td align="center" width="50%">
|
| 125 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example2-qwen-image-edit.png"
|
| 126 |
+
alt="example2-qwen-image-edit"
|
| 127 |
+
width="100%"><br/>
|
| 128 |
+
<h5><b>Qwen-Image-Edit</b></h5>
|
| 129 |
+
</td>
|
| 130 |
+
<td align="center" width="50%">
|
| 131 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example2-eigen-banana.png"
|
| 132 |
+
alt="example2-eigen-banana"
|
| 133 |
+
width="100%"><br/>
|
| 134 |
+
<h5><b>Eigen-Banana (⚡Lightning)</b></h5>
|
| 135 |
+
</td>
|
| 136 |
+
</tr>
|
| 137 |
+
</table>
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
### Example 3 – Add a new text
|
| 141 |
+
|
| 142 |
+
<!-- Input (moderate width, centered) -->
|
| 143 |
+
<p align="center">
|
| 144 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example3-input.png"
|
| 145 |
+
alt="example3-input"
|
| 146 |
+
width="360">
|
| 147 |
+
</p>
|
| 148 |
+
|
| 149 |
+
**Prompt:** Add the text "CHAMPION" in a bold, sans-serif font, horizontally aligned below the existing "GLASGOW" text on the race bib of the runner wearing number 454 (yellow singlet), ensuring the text color, lighting, and subtle fabric distortion match the existing elements on the bib.
|
| 150 |
+
|
| 151 |
+
**Outputs**
|
| 152 |
+
|
| 153 |
+
<!-- Two-up grid with captions (works on HF + GitHub) -->
|
| 154 |
+
<table>
|
| 155 |
+
<tr>
|
| 156 |
+
<td align="center" width="50%">
|
| 157 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example3-qwen-image-edit.png"
|
| 158 |
+
alt="example3-qwen-image-edit"
|
| 159 |
+
width="100%"><br/>
|
| 160 |
+
<h5><b>Qwen-Image-Edit</b></h5>
|
| 161 |
+
</td>
|
| 162 |
+
<td align="center" width="50%">
|
| 163 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example3-eigen-banana.png"
|
| 164 |
+
alt="example3-eigen-banana"
|
| 165 |
+
width="100%"><br/>
|
| 166 |
+
<h5><b>Eigen-Banana (⚡Lightning)</b></h5>
|
| 167 |
+
</td>
|
| 168 |
+
</tr>
|
| 169 |
+
</table>
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
### Example 4 – Add a new scene/background
|
| 173 |
+
|
| 174 |
+
<!-- Input (moderate width, centered) -->
|
| 175 |
+
<p align="center">
|
| 176 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example4-input.png"
|
| 177 |
+
alt="example4-input"
|
| 178 |
+
width="360">
|
| 179 |
+
</p>
|
| 180 |
+
|
| 181 |
+
**Prompt:** Replace the current plain wall background with a sophisticated, softly lit indoor event space, featuring warm golden ambient lighting, elegant architectural details such as decorative panels or subtle artwork, and a slightly blurred depth of field to keep the focus on the subjects while ensuring the new background's rich, muted tones complement their attire.
|
| 182 |
+
|
| 183 |
+
**Outputs**
|
| 184 |
+
|
| 185 |
+
<!-- Two-up grid with captions (works on HF + GitHub) -->
|
| 186 |
+
<table>
|
| 187 |
+
<tr>
|
| 188 |
+
<td align="center" width="50%">
|
| 189 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example4-qwen-image-edit.png"
|
| 190 |
+
alt="example4-qwen-image-edit"
|
| 191 |
+
width="100%"><br/>
|
| 192 |
+
<h5><b>Qwen-Image-Edit</b></h5>
|
| 193 |
+
</td>
|
| 194 |
+
<td align="center" width="50%">
|
| 195 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example4-eigen-banana.png"
|
| 196 |
+
alt="example4-eigen-banana"
|
| 197 |
+
width="100%"><br/>
|
| 198 |
+
<h5><b>Eigen-Banana (⚡Lightning)</b></h5>
|
| 199 |
+
</td>
|
| 200 |
+
</tr>
|
| 201 |
+
</table>
|
| 202 |
+
|
| 203 |
+
|
| 204 |
+
### Example 5 – Modify expressions
|
| 205 |
+
|
| 206 |
+
<!-- Input (moderate width, centered) -->
|
| 207 |
+
<p align="center">
|
| 208 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example5-input.png"
|
| 209 |
+
alt="example5-input"
|
| 210 |
+
width="360">
|
| 211 |
+
</p>
|
| 212 |
+
|
| 213 |
+
**Prompt:** Adjust the subject's facial expression to a subtle, closed-mouth smile, ensuring natural skin folds and realistic lighting on the face, while maintaining the existing head posture and integrating seamlessly with the overall image context.
|
| 214 |
+
|
| 215 |
+
**Outputs**
|
| 216 |
+
|
| 217 |
+
<!-- Two-up grid with captions (works on HF + GitHub) -->
|
| 218 |
+
<table>
|
| 219 |
+
<tr>
|
| 220 |
+
<td align="center" width="50%">
|
| 221 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example5-qwen-image-edit.png"
|
| 222 |
+
alt="example5-qwen-image-edit"
|
| 223 |
+
width="100%"><br/>
|
| 224 |
+
<h5><b>Qwen-Image-Edit</b></h5>
|
| 225 |
+
</td>
|
| 226 |
+
<td align="center" width="50%">
|
| 227 |
+
<img src="https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit/resolve/main/assets/example5-eigen-banana.png"
|
| 228 |
+
alt="example5-eigen-banana"
|
| 229 |
+
width="100%"><br/>
|
| 230 |
+
<h5><b>Eigen-Banana (⚡Lightning)</b></h5>
|
| 231 |
+
</td>
|
| 232 |
+
</tr>
|
| 233 |
+
</table>
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
## Installation
|
| 237 |
+
|
| 238 |
+
### Requirements
|
| 239 |
+
|
| 240 |
+
- Python 3.8+
|
| 241 |
+
- CUDA-capable GPU (recommended)
|
| 242 |
+
- 8GB+ VRAM
|
| 243 |
+
|
| 244 |
+
### Setup
|
| 245 |
+
|
| 246 |
+
1. Clone the DiffSynth-Studio repository:
|
| 247 |
+
|
| 248 |
+
```bash
|
| 249 |
+
git clone https://github.com/modelscope/DiffSynth-Studio.git
|
| 250 |
+
cd DiffSynth-Studio
|
| 251 |
+
```
|
| 252 |
+
|
| 253 |
+
2. Install the package:
|
| 254 |
+
|
| 255 |
+
```bash
|
| 256 |
+
pip install -e .
|
| 257 |
+
```
|
| 258 |
+
|
| 259 |
+
3. Install additional dependencies:
|
| 260 |
+
|
| 261 |
+
```bash
|
| 262 |
+
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
|
| 263 |
+
```
|
| 264 |
+
|
| 265 |
+
## Usage
|
| 266 |
+
|
| 267 |
+
### Basic Image Editing
|
| 268 |
+
|
| 269 |
+
```python
|
| 270 |
+
from diffsynth.pipelines.qwen_image import QwenImagePipeline, ModelConfig
|
| 271 |
+
import torch
|
| 272 |
+
|
| 273 |
+
# Initialize the pipeline
|
| 274 |
+
pipe = QwenImagePipeline.from_pretrained(
|
| 275 |
+
torch_dtype=torch.bfloat16,
|
| 276 |
+
device="cuda",
|
| 277 |
+
model_configs=[
|
| 278 |
+
ModelConfig(
|
| 279 |
+
model_id="Qwen/Qwen-Image-Edit",
|
| 280 |
+
origin_file_pattern="transformer/diffusion_pytorch_model*.safetensors"
|
| 281 |
+
),
|
| 282 |
+
ModelConfig(
|
| 283 |
+
model_id="Qwen/Qwen-Image",
|
| 284 |
+
origin_file_pattern="text_encoder/model*.safetensors"
|
| 285 |
+
),
|
| 286 |
+
ModelConfig(
|
| 287 |
+
model_id="Qwen/Qwen-Image",
|
| 288 |
+
origin_file_pattern="vae/diffusion_pytorch_model.safetensors"
|
| 289 |
+
),
|
| 290 |
+
],
|
| 291 |
+
processor_config=ModelConfig(
|
| 292 |
+
model_id="Qwen/Qwen-Image-Edit",
|
| 293 |
+
origin_file_pattern="processor/"
|
| 294 |
+
),
|
| 295 |
+
)
|
| 296 |
+
|
| 297 |
+
# Load the Eigen-Banana-Qwen-Image-Edit LoRA
|
| 298 |
+
pipe.load_lora(pipe.dit, "eigen-ai-labs/eigen-banana-qwen-image-edit/eigen-banana-qwen-image-edit-fp16-lora.safetensors")
|
| 299 |
+
|
| 300 |
+
# Generate an initial image
|
| 301 |
+
prompt = "A beautiful portrait, underwater girl, blue dress flowing, hair drifting, light penetrating, bubbles surrounding, serene face, exquisite details, dreamy and aesthetic."
|
| 302 |
+
input_image = pipe(
|
| 303 |
+
prompt=prompt,
|
| 304 |
+
seed=0,
|
| 305 |
+
num_inference_steps=40,
|
| 306 |
+
height=1328,
|
| 307 |
+
width=1024
|
| 308 |
+
)
|
| 309 |
+
input_image.save("original.jpg")
|
| 310 |
+
|
| 311 |
+
# Edit the image
|
| 312 |
+
edit_prompt = "Change the dress to pink"
|
| 313 |
+
edited_image = pipe(
|
| 314 |
+
edit_prompt,
|
| 315 |
+
edit_image=input_image,
|
| 316 |
+
seed=1,
|
| 317 |
+
num_inference_steps=40,
|
| 318 |
+
height=1328,
|
| 319 |
+
width=1024,
|
| 320 |
+
edit_image_auto_resize=True
|
| 321 |
+
)
|
| 322 |
+
edited_image.save("edited.jpg")
|
| 323 |
+
```
|
| 324 |
+
|
| 325 |
+
### Chinese Prompts Example
|
| 326 |
+
|
| 327 |
+
```python
|
| 328 |
+
# Generate initial image with Chinese prompt
|
| 329 |
+
prompt = "精致肖像,水下少女,蓝裙飘逸,发丝轻扬,光影透澈,气泡环绕,面容恬静,细节精致,梦幻唯美。"
|
| 330 |
+
input_image = pipe(
|
| 331 |
+
prompt=prompt,
|
| 332 |
+
seed=0,
|
| 333 |
+
num_inference_steps=40,
|
| 334 |
+
height=1328,
|
| 335 |
+
width=1024
|
| 336 |
+
)
|
| 337 |
+
input_image.save("image1.jpg")
|
| 338 |
+
|
| 339 |
+
# Edit with Chinese prompt
|
| 340 |
+
prompt = "将裙子改为粉色"
|
| 341 |
+
edited_image = pipe(
|
| 342 |
+
prompt,
|
| 343 |
+
edit_image=input_image,
|
| 344 |
+
seed=1,
|
| 345 |
+
num_inference_steps=40,
|
| 346 |
+
height=1328,
|
| 347 |
+
width=1024,
|
| 348 |
+
edit_image_auto_resize=True
|
| 349 |
+
)
|
| 350 |
+
edited_image.save("image2.jpg")
|
| 351 |
+
```
|
| 352 |
+
|
| 353 |
+
### Advanced Usage
|
| 354 |
+
|
| 355 |
+
#### Auto-Resize Options
|
| 356 |
+
|
| 357 |
+
The `edit_image_auto_resize` parameter controls how input images are processed:
|
| 358 |
+
|
| 359 |
+
```python
|
| 360 |
+
# Auto-resize: maintains aspect ratio while matching 1024x1024 area
|
| 361 |
+
edited_image = pipe(
|
| 362 |
+
prompt,
|
| 363 |
+
edit_image=input_image,
|
| 364 |
+
num_inference_steps=40,
|
| 365 |
+
height=1328,
|
| 366 |
+
width=1024,
|
| 367 |
+
edit_image_auto_resize=True # Recommended for best results
|
| 368 |
+
)
|
| 369 |
+
|
| 370 |
+
# No resize: use original image size
|
| 371 |
+
edited_image = pipe(
|
| 372 |
+
prompt,
|
| 373 |
+
edit_image=input_image,
|
| 374 |
+
num_inference_steps=40,
|
| 375 |
+
height=1328,
|
| 376 |
+
width=1024,
|
| 377 |
+
edit_image_auto_resize=False # Use when input matches target size
|
| 378 |
+
)
|
| 379 |
+
```
|
| 380 |
+
|
| 381 |
+
#### Inference Steps Optimization
|
| 382 |
+
|
| 383 |
+
The model works well with reduced steps for faster generation:
|
| 384 |
+
|
| 385 |
+
```python
|
| 386 |
+
# High quality (slower)
|
| 387 |
+
image = pipe(prompt, edit_image=input_image, num_inference_steps=40)
|
| 388 |
+
|
| 389 |
+
# Balanced (recommended)
|
| 390 |
+
image = pipe(prompt, edit_image=input_image, num_inference_steps=20)
|
| 391 |
+
|
| 392 |
+
# Fast (may reduce quality slightly)
|
| 393 |
+
image = pipe(prompt, edit_image=input_image, num_inference_steps=10)
|
| 394 |
+
```
|
| 395 |
+
|
| 396 |
+
## Example Prompts
|
| 397 |
+
|
| 398 |
+
### English Prompts
|
| 399 |
+
|
| 400 |
+
- "Transform this image into a cartoon style"
|
| 401 |
+
- "Change the background to a sunset beach"
|
| 402 |
+
- "Make it look like a watercolor painting"
|
| 403 |
+
- "Add neon lights in cyberpunk style"
|
| 404 |
+
- "Convert to black and white photograph"
|
| 405 |
+
- "Change the sky to nighttime with stars"
|
| 406 |
+
|
| 407 |
+
### Chinese Prompts
|
| 408 |
+
|
| 409 |
+
- "将图片转换为卡通风格"
|
| 410 |
+
- "把背景改成夕阳海滩"
|
| 411 |
+
- "改成水彩画风格"
|
| 412 |
+
- "添加赛博朋克风格的霓虹灯"
|
| 413 |
+
- "转换为黑白照片"
|
| 414 |
+
- "将天空改为夜晚星空"
|
| 415 |
+
|
| 416 |
+
## Parameters
|
| 417 |
+
|
| 418 |
+
| Parameter | Type | Default | Description |
|
| 419 |
+
|-----------|------|---------|-------------|
|
| 420 |
+
| `prompt` | str | - | Text description for image generation/editing |
|
| 421 |
+
| `edit_image` | PIL.Image | None | Input image to edit (omit for text-to-image) |
|
| 422 |
+
| `num_inference_steps` | int | 20 | Number of denoising steps |
|
| 423 |
+
| `height` | int | 1024 | Output image height |
|
| 424 |
+
| `width` | int | 1024 | Output image width |
|
| 425 |
+
| `seed` | int | 0 | Random seed for reproducibility |
|
| 426 |
+
| `edit_image_auto_resize` | bool | True | Auto-resize input to match target area |
|
| 427 |
+
|
| 428 |
+
## Performance
|
| 429 |
+
|
| 430 |
+
- **Inference Speed**: ~2-3 seconds per image (40 steps, RTX 4090)
|
| 431 |
+
- **VRAM Usage**: ~6-8GB (bfloat16)
|
| 432 |
+
- **Recommended Steps**: 20-40 for optimal quality
|
| 433 |
+
|
| 434 |
+
## Limitations
|
| 435 |
+
|
| 436 |
+
- Works best with natural images and common objects
|
| 437 |
+
- May struggle with highly abstract or unusual concepts
|
| 438 |
+
- Quality depends on prompt clarity and specificity
|
| 439 |
+
- Very large images may require more VRAM
|
| 440 |
+
|
| 441 |
+
## Citation
|
| 442 |
+
|
| 443 |
+
If you use this model in your research, please cite:
|
| 444 |
+
|
| 445 |
+
```bibtex
|
| 446 |
+
@software{eigen-banana-qwen-image-edit,
|
| 447 |
+
title={Eigen-Banana-Qwen-Image-Edit: Fast Image Editing LoRA for Qwen-Image-Edit},
|
| 448 |
+
author={Eigen AI Labs},
|
| 449 |
+
year={2025},
|
| 450 |
+
url={https://huggingface.co/eigen-ai-labs/eigen-banana-qwen-image-edit}
|
| 451 |
+
}
|
| 452 |
+
```
|
| 453 |
+
|
| 454 |
+
If you use the Pico-Banana-400K dataset, please also cite:
|
| 455 |
+
|
| 456 |
+
```bibtex
|
| 457 |
+
@misc{qian2025picobanana400k,
|
| 458 |
+
title={Pico-Banana-400K: A Large-Scale Dataset for Text-Guided Image Editing},
|
| 459 |
+
author={Yusu Qian and Eli Bocek-Rivele and Liangchen Song and Jialing Tong and Yinfei Yang and Jiasen Lu and Wenze Hu and Zhe Gan},
|
| 460 |
+
year={2025},
|
| 461 |
+
eprint={2510.19808},
|
| 462 |
+
archivePrefix={arXiv},
|
| 463 |
+
primaryClass={cs.CV},
|
| 464 |
+
url={https://arxiv.org/abs/2510.19808}
|
| 465 |
+
}
|
| 466 |
+
```
|
| 467 |
+
|
| 468 |
+
## License
|
| 469 |
+
|
| 470 |
+
This model is a derivative work of the Qwen-Image-Edit model, which is released under the Apache 2.0 License.
|
| 471 |
+
|
| 472 |
+
The model was trained using the Pico-Banana-400K dataset, which is released under the Creative Commons Attribution–NonCommercial–NoDerivatives 4.0 International (CC BY-NC-ND 4.0) License.
|
| 473 |
+
|
| 474 |
+
License Details:
|
| 475 |
+
|
| 476 |
+
- Apache 2.0 License applies to the parts of the model derived from the Qwen-Image-Edit model.
|
| 477 |
+
|
| 478 |
+
- CC BY-NC-ND 4.0 License applies to the trained model due to the restrictions of the training dataset. Specifically, you may not:
|
| 479 |
+
|
| 480 |
+
- Use the model for commercial purposes.
|
| 481 |
+
|
| 482 |
+
- Create derivative works of the model.
|
| 483 |
+
|
| 484 |
+
- Distribute the model or dataset in a manner that violates the NoDerivatives condition.
|
| 485 |
+
|
| 486 |
+
Restrictions:
|
| 487 |
+
|
| 488 |
+
- The model may only be used for non-commercial purposes.
|
| 489 |
+
|
| 490 |
+
- You may not modify, adapt, or build upon the model.
|
| 491 |
+
|
| 492 |
+
- You may not distribute the model if the modifications to it would violate the NoDerivatives clause of the dataset’s license.
|
| 493 |
+
|
| 494 |
+
## Acknowledgements
|
| 495 |
+
|
| 496 |
+
- Trained on the [Pico-Banana-400K](https://github.com/apple/pico-banana-400k) dataset by Apple
|
| 497 |
+
- Built on top of [DiffSynth-Studio](https://github.com/modelscope/DiffSynth-Studio)
|
| 498 |
+
- Based on [Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) and [Qwen-Image-Edit](https://huggingface.co/Qwen/Qwen-Image-Edit)
|
| 499 |
+
- Special thanks to the Apple ML team for releasing the high-quality Pico-Banana-400K dataset
|
| 500 |
+
|
| 501 |
+
## Contact
|
| 502 |
+
|
| 503 |
+
For questions, issues, or collaborations, please contact us at: https://www.eigenai.com/contact.
|
| 504 |
+
|
| 505 |
+
---
|
| 506 |
+
|
| 507 |
+
**Note**: This is a LoRA checkpoint and requires the base Qwen-Image-Edit model to function. The base models will be automatically downloaded from HuggingFace when you run the code.
|
assets/example1-eigen-banana.png
ADDED
|
Git LFS Details
|
assets/example1-input.png
ADDED
|
Git LFS Details
|
assets/example1-qwen-image-edit.png
ADDED
|
Git LFS Details
|
assets/example2-eigen-banana.png
ADDED
|
Git LFS Details
|
assets/example2-input.png
ADDED
|
Git LFS Details
|
assets/example2-qwen-image-edit.png
ADDED
|
Git LFS Details
|
assets/example3-eigen-banana.png
ADDED
|
Git LFS Details
|
assets/example3-input.png
ADDED
|
Git LFS Details
|
assets/example3-qwen-image-edit.png
ADDED
|
Git LFS Details
|
assets/example4-eigen-banana.png
ADDED
|
Git LFS Details
|
assets/example4-input.png
ADDED
|
Git LFS Details
|
assets/example4-qwen-image-edit.png
ADDED
|
Git LFS Details
|
assets/example5-eigen-banana.png
ADDED
|
Git LFS Details
|
assets/example5-input.png
ADDED
|
Git LFS Details
|
assets/example5-qwen-image-edit.png
ADDED
|
Git LFS Details
|
eigen-banana-qwen-image-edit-fp16-lora.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:34b9891926a444cf0ed62233790f58c4200d8bee55c401bb3f6dd8fde9241df1
|
| 3 |
+
size 472047184
|