Group Relative Attention Guidance for Image Editing
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.
69018a99646208eac0d1f49d
Xuanpu Zhang
69018a99646208eac0d1f49e
Xuesong Niu
69018a99646208eac0d1f49f
Ruidong Chen
69018a99646208eac0d1f4a0
Dan Song
69018a99646208eac0d1f4a1
Jianhao Zeng
69018a99646208eac0d1f4a2
Penghui Du
claimed_verified
2025-10-29T12:41:52.279Z
647076467fd7ecdbd0ea03b1
/avatars/6e090ea5f88977c6f70544175094c2a6.svg
Penghui Du
eternaldolphin
user
eternaldolphin
69018a99646208eac0d1f4a3
Haoxiang Cao
69018a99646208eac0d1f4a4
Kai Wu
claimed_verified
2025-10-29T12:41:48.100Z
68e741ea3edb0ff47e20084e
https://cdn-avatars.huggingface.co/v1/production/uploads/68e741ea3edb0ff47e20084e/OyBgFqcU4QWyPF_K58Gt5.jpeg
Wu Kai
KaiiWuu1993
user
KaiiWuu1993
69018a99646208eac0d1f4a5
An-an Liu
Group Relative Attention Guidance for Image Editing
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.
Group Relative Attention Guidance enhances image editing quality by modulating token deltas in Diffusion-in-Transformer models, providing fine-grained control over editing intensity.
Diffusion-in-Transformer MM-Attention Query tokens Key tokens bias vector Group Relative Attention Guidance Classifier-Free Guidance