Group Relative Attention Guidance for Image Editing

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zhang, Xuanpu, Niu, Xuesong, Chen, Ruidong, Song, Dan, Zeng, Jianhao, Du, Penghui, Cao, Haoxiang, Wu, Kai, Liu, An-an
Formato: Preprint
Publicado: 2025
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866909931946377216
author Zhang, Xuanpu
Niu, Xuesong
Chen, Ruidong
Song, Dan
Zeng, Jianhao
Du, Penghui
Cao, Haoxiang
Wu, Kai
Liu, An-an
author_facet Zhang, Xuanpu
Niu, Xuesong
Chen, Ruidong
Song, Dan
Zeng, Jianhao
Du, Penghui
Cao, Haoxiang
Wu, Kai
Liu, An-an
contents Recently, image editing based on Diffusion-in-Transformer models has undergone rapid development. However, existing editing methods often lack effective control over the degree of editing, limiting their ability to achieve more customized results. To address this limitation, we investigate the MM-Attention mechanism within the DiT model and observe that the Query and Key tokens share a bias vector that is only layer-dependent. We interpret this bias as representing the model's inherent editing behavior, while the delta between each token and its corresponding bias encodes the content-specific editing signals. Based on this insight, we propose Group Relative Attention Guidance, a simple yet effective method that reweights the delta values of different tokens to modulate the focus of the model on the input image relative to the editing instruction, enabling continuous and fine-grained control over editing intensity without any tuning. Extensive experiments conducted on existing image editing frameworks demonstrate that GRAG can be integrated with as few as four lines of code, consistently enhancing editing quality. Moreover, compared to the commonly used Classifier-Free Guidance, GRAG achieves smoother and more precise control over the degree of editing. Our code will be released at https://github.com/little-misfit/GRAG-Image-Editing.
format Preprint
id arxiv_https___arxiv_org_abs_2510_24657
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Group Relative Attention Guidance for Image Editing
Zhang, Xuanpu
Niu, Xuesong
Chen, Ruidong
Song, Dan
Zeng, Jianhao
Du, Penghui
Cao, Haoxiang
Wu, Kai
Liu, An-an
Computer Vision and Pattern Recognition
Recently, image editing based on Diffusion-in-Transformer models has undergone rapid development. However, existing editing methods often lack effective control over the degree of editing, limiting their ability to achieve more customized results. To address this limitation, we investigate the MM-Attention mechanism within the DiT model and observe that the Query and Key tokens share a bias vector that is only layer-dependent. We interpret this bias as representing the model's inherent editing behavior, while the delta between each token and its corresponding bias encodes the content-specific editing signals. Based on this insight, we propose Group Relative Attention Guidance, a simple yet effective method that reweights the delta values of different tokens to modulate the focus of the model on the input image relative to the editing instruction, enabling continuous and fine-grained control over editing intensity without any tuning. Extensive experiments conducted on existing image editing frameworks demonstrate that GRAG can be integrated with as few as four lines of code, consistently enhancing editing quality. Moreover, compared to the commonly used Classifier-Free Guidance, GRAG achieves smoother and more precise control over the degree of editing. Our code will be released at https://github.com/little-misfit/GRAG-Image-Editing.
title Group Relative Attention Guidance for Image Editing
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2510.24657