FireRed-Image-Edit

FireRedTeamApache-2.0更新放缓

开源图像编辑基础模型,能精准理解指令完成高保真修图,并保持人物身份一致、自然融合多元素,适合做图像编辑训练与微调。

FireRed-Image-Edit is a powerful image editing foundation model achieving open-source state-of-the-art performance with precise instruction following, high-fidelity generation, superior identity consistency, and seamless multi-element fusion.

暂无版本1,386star85fork同步于 2026-11-07 07:30 UTC

怎么上手

由 README 提炼,执行前请确认
python inference.py --optimized True
硬件要求按 README 说明

README 提到优化推理仅需 30GB 显存、约 4.5s/样本;未说明具体 GPU 厂商型号,也未提及 CPU 运行。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源图像编辑基础模型,指令跟随精准、身份一致性强,适合做人像与多图融合编辑

开源图像编辑基础模型,能精准理解指令完成高保真修图,并保持人物身份一致、自然融合多元素,适合做图像编辑训练与微调。

核心能力

  • 保持角色身份一致性,复杂编辑后主体仍可辨认
  • Agent 自动裁剪拼接,融合 10+ 元素
  • 支持人像妆容、文字风格参考与老照片修复
  • 蒸馏+量化+静态编译,30GB 显存下约 4.5 秒出图
  • 提供 LoRA 训练代码与 ComfyUI 节点、GGUF 格式

容易踩的坑

需先从 HuggingFace 或 ModelScope 单独下载模型权重;优化推理依赖蒸馏 LoRA、量化与静态编译等组件,需按脚本配置;ComfyUI 与 GGUF 为额外集成,需另行准备。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    🔥 FireRed-Image-Edit

    FireRed-Image-Edit-1.1 Based on the FireRed-Image-Edit-1.0 foundation model, it optimizes portrait consistency, multi-element fusion, stylized text reference, and portrait makeup effects.

    FireRed-Image-Edit-1.0 is a general-purpose image editing model that delivers high-fidelity and consistent editing across a wide range of scenarios. FireRed-Image-Edit delivers leading open-source results with accurate instruction following, high image quality, and consistent visual coherence.

    ✨ 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
    • 🏋️ Efficient Training Methodology: Offline feature pre-extraction completely decouples VLM inference from training workflow, eliminating generation overhead for maximum convergence speed.
    Native Editing Capability from T2I Backbone
    • 🏗️ Backbone-Agnostic Architecture: Editing capabilities injected through full Pretrain → SFT → RL pipeline, transferable to any T2I foundation model.

    📰 News

    • 2026.03.25: ModelScope now supports LoRA training for FireRed-image-edit.
    • 2026.03.09: We have released REDEdit-Bench, a new image editing benchmark. REDEdit-Bench covers more diverse scenarios and editing instructions that better align with human language, providing a more comprehensive and realistic evaluation for image editing tasks.
    • 2026.03.03: We release FireRed-Image-Edit-1.1, which, based on the FireRed-Image-Edit-1.0 foundation model, optimizes portrait consistency, multi-element fusion, stylized text reference, and portrait makeup effects.
    • 2026.03.01: We offer a lightweight inference script (including distilled Lora, quantization, db_cache, and static compilation), now requiring only 30GB VRAM and ~4.5s/sample. 🚀 Try it by simply running python inference.py --optimized True.
    • 2026.02.28: We released the Train, supporting HSDP/FSDP, Disaggregated Training, and Multi-Condition Aware Bucket Sampler.
    • 2026.02.27: We released the Agent module for instruction rewriting, multi-image preprocessing, supporting automatic ROI detection, image stitching for editing with more than 3 images.
    • 2026.02.27: We provided FireRed-Image-Edit-1.0-ComfyUI workflow. Check more details on Huggingface
    • 2026.02.14: We released FireRed-Image-Edit-1.0 model weights. Check more details on Huggingface and ModelScope.
    • 2026.02.10: We released the Technical Report of FireRed-Image-Edit-1.0.

    🏆 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. Detailed information can be found here.

    🎨 Showcase

    Some real outputs produced by FireRed-Image-Edit across general editing.

    Portrait(More Cases | 更多结果)

    Multi-image-fusion(More Cases)

    case1: 将图2的男人,穿着图2的黑色"New York Bears"棒球夹克和迷彩裤子和蓝黑配色的AJ1高帮球鞋,在图1的空旷的橄榄球场上。球场阳光明媚,他带着图2黑色的帽子,帽檐是红色,夹克上的白色条纹在暗光中格外醒目。他的左肩随意地挎着图3那只复古棕色皮质旅行包,包口微微敞开,露出里面图3那个磨损的棕色橄榄球。右手则轻松地拖着图3的白色滑板,板底那威武的黑色狮子图腾在草地映衬下如同猛兽。图3那只壮实的深棕色斗牛犬安静地蹲坐在他脚边的阴影里,忠诚地望向主人。男人脖子上挂着图2那副黑色Beats耳机,地上放着图3那座复古的青铜奖杯,在阳光下下泛着胜利的光芒。整个场景融合了街头潮流与竞技体育的质感,空旷球场、皮革装备的温润光泽、以及滑板带来的街头气息,共同构成了一个关于青春、热爱与赛后孤独的静谧时刻。

    Makeup(Lora)

    case1: 为人物添加欧美Y2K妆:使用冷白皮哑光粉底均匀肤色,描绘粗平的深棕色挑眉,眼部涂抹亮片银灰眼影并晕染至眉骨,画上黑色上扬眼线,粘贴浓密假睫毛,用浅金色高光提亮卧蚕,在苹果肌扫上蜜桃色腮红,唇部涂抹镜面玻璃唇釉,并在颧骨处轻扫修容粉。

    case2: 为人物添加缎光底妆:使用自然色缎光粉底均匀肤色,描绘自然眉形并填充浅棕色眉粉,眼部涂抹深棕色眼影并晕染眼尾,画自然内眼线,刷上浓密睫毛膏,在卧蚕处提亮,涂抹水润感红色豆沙色口红并勾勒唇形,在苹果肌扫上粉色腮红,在鼻梁、颧骨处轻扫银色高光。

    Text Style Reference(Lora)(More Cases)

    🗂️ Model Zoo

    🏗️ Model Architecture

    ⚡️ Quick Start

    1. Install dependencies
    pip install -r requirements.txt
    
    1. Use the following code snippets to generate or edit images.
    python inference.py \
        --input_image ./examples/edit_example.png \
        --prompt "在书本封面Python的下方,添加一行英文文字2nd Edition" \
        --output_image output_edit.png \
        --seed 43
    

    🤖 Agent

    The Agent module provides Recaption & Multi-Image Preprocessing capabilities.

    FireRed-Image-Edit natively supports 1–3 input images. When users need to edit with more than 3 images, the built-in Agent module automatically:

    1. ROI Detection – Sends all images + the user instruction to a Gemini function-calling model that returns a bounding-box for the most relevant region in each image.
    2. Crop & Stitch – Crops each image to its ROI, then partitions and stitches them into 2–3 composite images (≈1024×1024 each) while minimising whitespace and preserving content at maximum resolution.
    3. Recaption – Rewrites the user instruction so that image references (图1/图2/image N …) correctly point to the new composite images, and expands the prompt to ~512 words/characters for richer editing context. The user's original language is preserved.

    (Optional) To enable the Recaption feature (rewriting instructions via an LLM for better editing results), set up one of the supported LLM providers:

    Option 1: Gemini (default)

    export GEMINI_API_KEY="your-gemini-api-key"
    

    Option 2: MiniMax

    export RECAPTION_PROVIDER="minimax"
    export MINIMAX_API_KEY="your-minimax-api-key"
    

    Uses the MiniMax OpenAI-compatible API with the MiniMax-M2.7 model by default. You can also use MiniMax-M2.7-highspeed for faster responses.

    Option 3: Any OpenAI-compatible API

    export RECAPTION_PROVIDER="openai_compatible"
    export OPENAI_COMPATIBLE_API_KEY="your-api-key"
    export OPENAI_COMPATIBLE_BASE_URL="https://your-api.example.com/v1"
    export OPENAI_COMPATIBLE_MODEL="your-model-name"
    

    Note: The LLM API is not required for basic usage. Without it, the Agent will still perform ROI detection and image stitching normally, but will skip the instruction rewriting step. Setting an LLM API key is recommended for best results. The ROI detection step always uses Gemini (multimodal required).

    🏋️ How to Train

    Training is a two-step process:

    1. Extract VLM embeddings — Run offline extraction on your image–text JSONL.
    2. SFT training — Train on the extracted embeddings (HSDP/FSDP, multi-node supported).

    → Full details: train/README.md (data format, environment, commands).

    📊 Benchmark

    To better validate the capabilities of our model, we propose a benchmark called REDEdit-Bench. Our main goal is to build more diverse scenarios and editing instructions that better align with human language, enabling a more comprehensive evaluation of current editing models. We collected over 3,000 images from the internet, and after careful expert-designed selection, we constructed 1,673 bilingual (Chinese–English) editing pairs across 15 categories.

    Inference and Evaluation Code

    We provide the inference and evaluation code for REDEdit-Bench. Please refer to the redbench_infer.py and redbench_eval.py scripts in the tools directory for more details.

    Benchmark Distribution

    The REDEdit-Bench dataset will be available soon.

    📜 License Agreement

    The code and the weights of FireRed-Image-Edit are licensed under Apache 2.0.

    📝 TODO:

    • Release FireRed-Image-Edit-1.0 model.
    • Release FireRed-Image-Edit-1.0-Distilled model, a distilled version of FireRed-Image-Edit-1.0 for few-step generation.
    • FireRed-Image-Edit-1.1 released with improvements to portrait consistency, multi-element fusion, stylized text reference, and portrait makeup effects.
    • Release of lightweight editing models comparable to zimage/Flux2-klein and other small-parameter variants.
    • Release REDEdit-Bench, a comprehensive benchmark for image editing evaluation.
    • Release FireRed-Image model, a text-to-image generative model.

    🖊️ Citation

    We kindly encourage citation of our work if you find it useful.

    @article{firered2026rededit,
          title={FireRed-Image-Edit-1.0 Technical Report}, 
          author={Super Intelligence Team},
          year={2026},
          archivePrefix={arXiv},
          primaryClass={cs.CV},
          url={https://arxiv.org/abs/2602.13344}, 
    }
    

    ⚠️ Ethics Statement

    FireRed-Image-Edit has not been specifically designed or comprehensively evaluated for every possible downstream application. Users should be aware of the potential risks and ethical considerations when using this project, and should use it responsibly and in compliance with all applicable laws and regulations.

    • Prohibited Use: This project must not be used to generate content that is illegal, defamatory, pornographic, harmful, or that violates the privacy, rights, or interests of individuals or organizations.
    • User Responsibility: Users are solely responsible for any content generated using this project. The authors and contributors assume no responsibility or liability for any misuse of the codebase or for any consequences resulting from its use.

    🤝 Acknowledgements

    We would like to thank the developers of the amazing open-source projects, especially Qwen-Image for providing a powerful text-to-image foundation model, as well as Diffusers and HuggingFace.

    ☎️ Contact

    Please contact us and join our Xiaohongshu Group if you have any questions.

    Xiaohongshu Group

    <img src=assets/xhs.png width="200px">

    ⭐ Star History

    Star History Chart