Instructions to use jian27/FireRed-Image-Edit-1.1-sdnq-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use jian27/FireRed-Image-Edit-1.1-sdnq-4b with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("jian27/FireRed-Image-Edit-1.1-sdnq-4b", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
🤗 HuggingFace | 🤖 ModelScope | 🖥️ Demo | 📄 Technical Report
🔥 FireRed-Image-Edit-1.1
We introduce FireRed-Image-Edit-1.1, an upgrade to our general-purpose image editing foundation model. Building upon the capabilities presented in the FireRed-Image-Edit-1.0 Technical Report, version 1.1 significantly enhances identity consistency, multi-image conditioning, and domain-specialized editing performance, bringing the model closer to real-world creative production needs.
✨ Key Features
Strong Editing Performance
- 🆔 State-of-the-Art Identity Consistency: Open-source SOTA in character identity preservation, ensuring subjects remain recognizable across complex edits.
- 🧩 Multi-Element Fusion: Freely combine 10+ elements with Agent-powered automatic cropping and stitching—no more struggles with short prompts.
- 💄 Comprehensive Portrait Makeup: Dozens of styles from professional beauty retouching and yellow/olive skin tone brightening to Halloween witch makeup and creative looks.
- 📝 Text Style Reference: Maintains high-fidelity typography and stylized text comparable to closed-source solutions.
- 🖼️ Professional Photo Restoration: High-quality old photo repair and enhancement with superior detail recovery.
Ultimate Engineering Optimization
- 🔧 Open LoRA Training Ecosystem: Full training code released for custom style creation, optimized samplers maximize GPU efficiency for identical tasks, sizes, and input counts.
- ⚡ Extreme Speed Optimization: Complete acceleration suite featuring distillation, quantization, and static compilation—delivering 4.5s end-to-end generation with just 30GB VRAM
- 🤖 Intelligent Agent Workflow: Automatic multi-image processing handles complex compositions like virtual try-on without requiring lengthy prompt engineering
- 🔌 Universal Deployment: Native ComfyUI node support and GGUF lightweight format compatibility for seamless production integration
🎨 Showcase
Some real outputs produced by FireRed-Image-Edit across general editing.
Portrait(More Cases | 更多结果)
Multi-image-fusion(More Cases
Makeup(Lora)
Text Style Reference(Lora)(More Cases)
🏆 Evaluation Results
FireRed-Image-Edit establishes a new state-of-the-art among open-source models on Imgedit, Gedit, and RedEdit, while surpassing our closed-source competitors in specific dimensions—a distinction further corroborated by human evaluations highlighting its superior prompt following and visual consistency.
🚀 SDNQ 4bit 量化版使用说明
本仓库 jian27/FireRed-Image-Edit-1.1-sdnq-4b 是 FireRed-Image-Edit-1.1 的 SDNQ 4bit 量化版本,旨在降低显存占用,使模型能在显存有限的消费级显卡(如 16GB 的 RTX 4070 Ti Super)上运行。完整 pipeline 显存需求较高,推荐启用 CPU 卸载以控制显存峰值。
环境依赖
pip install torch diffusers transformers accelerate sdnq
推理示例
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image
import sdnq # 关键:导入 sdnq,让 diffusers 能识别 SDNQ 量化格式
# 1. 加载 SDNQ 4bit 量化模型(直接从本仓库加载)
model_path = "jian27/FireRed-Image-Edit-1.1-sdnq-4b"
print(f"正在加载量化模型:{model_path}")
pipe = DiffusionPipeline.from_pretrained(
model_path,
dtype=torch.bfloat16,
)
# 2. 启用 CPU 卸载,缓解 16GB 显存压力
pipe.enable_model_cpu_offload()
# 3. 准备输入图片和编辑指令
input_image = load_image(
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png"
)
prompt = "Turn this cat into a dog"
print("正在生成图片...")
# 4. 执行推理
image = pipe(image=input_image, prompt=prompt).images[0]
# 5. 保存结果
output_path = "output_edited.png"
image.save(output_path)
print(f"完成!图片已保存为:{output_path}")
- Downloads last month
- 20