ComfyUI_GRAG_Image_Editing

ComfyUI_GRAG_Image_Editing
★ 8

图像编辑注意力引导模型兼容ComfyUI插件
在ComfyUI中集成GRAG图像编辑,通过Group-Relative Attention引导对图像局部进行精细修改,兼顾safetensor/gguf加载与2509模型支持。
💡 在ComfyUI内基于注意力组精确编辑图像细节。
🍴 1 Forks💻 Python🔄 2025-11-30
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/c1eafc754fbb
📦 requirements.txt
accelerate
diffusers
gradio
ipykernel
jaraco.collections
matplotlib
pathlib
pickleshare
pip-chill
termcolor
tomli
torch
torchvision
transformers
huggingface_hub
📄 README

ComfyUI_GRAG_Image_Editing

GRAG-Image-Editing : Group-Relative Attention Guidance for Image Editing,you can try it in comfyUI

Update

  • fix safetensor load error ,if use safetensor need Ram >64 / 使用单体safetensor 加载时,尤其是comfy的量化版本,因为diffuser要二次处理,对内存占用较大,所以推荐用fp16的模型或者gguf,此插件对量化的safetensor模型内存优化支持一般;
  • add 2509 support / 增加2509模型的支持,注意要输入2张以上的图片
  • 1.Installation


    In the ./ComfyUI/custom_nodes directory, run the following:

    git clone https://github.com/smthemex/ComfyUI_GRAG_Image_Editing

    2.requirements


  • 不装也行,没什么需求,diffuser版本高点
  • pip install -r requirements.txt

    3.Model


  • gguf or transformer smthem/Qwen-Image-GGUF or other or comfy-org optional/随便哪个gguf或者comfyUI官方的transformer
  • comfyUI normal: qwen-image vae and qwen_2.5_vl_7b
  • lora, lightx2v 8step lora# 千问edit加速
  • ├── ComfyUI/models/gguf # or transformer
    |     ├── Qwen-Image-BF16.gguf # or Q8
    ├── ComfyUI/models/diffusion_models # or gguf
    |     ├── Qwen-Image-BF16..safetensors # or e4m3fn
    ├── ComfyUI/models/vae
    |        ├─Qwen-Image.safetensors  # rename it 换个名字
    ├── ComfyUI/models/clip
    |        ├──qwen_2.5_vl_7b_fp8_scaled.safetensors
    ├── ComfyUI/models/loras 
    |        ├──Qwen-Image-Edit-Lightning-8steps-V1.0-bf16.safetensors
    

    Example

    Citation

    @misc{zhang2025grouprelativeattentionguidance,
          title={Group Relative Attention Guidance for Image Editing}, 
          author={Xuanpu Zhang and Xuesong Niu and Ruidong Chen and Dan Song and Jianhao Zeng and Penghui Du and Haoxiang Cao and Kai Wu and An-an Liu},
          year={2025},
          eprint={2510.24657},
          archivePrefix={arXiv},
          primaryClass={cs.CV},
          url={https://arxiv.org/abs/2510.24657}, 
    }