이미지 편집을 위한 그룹 상대적 주의 안내
Group Relative Attention Guidance for Image Editing
October 28, 2025
저자: Xuanpu Zhang, Xuesong Niu, Ruidong Chen, Dan Song, Jianhao Zeng, Penghui Du, Haoxiang Cao, Kai Wu, An-an Liu
cs.AI
초록
최근 Diffusion-in-Transformer 모델 기반 이미지 편집 기술이 급속도로 발전하고 있습니다. 그러나 기존 편집 방법들은 편집 정도에 대한 효과적인 제어가 부족하여 보다 맞춤형 결과를 달성하는 데 한계가 있습니다. 이러한 한계를 해결하기 위해 우리는 DiT 모델 내 MM-Attention 메커니즘을 분석한 결과, Query와 Key 토큰이 레이어에만 의존하는 편향 벡터를 공유한다는 사실을 관찰했습니다. 우리는 이 편향을 모델의 내재적 편집 행동을 나타내는 것으로 해석하는 한편, 각 토큰과 해당 편향 사이의 델타 값은 콘텐츠 특화 편집 신호를 인코딩한다고 해석합니다. 이러한 통찰을 바탕으로 우리는 Group Relative Attention Guidance(GRAG)를 제안합니다. 이는 간단하면서도 효과적인 방법으로, 서로 다른 토큰들의 델타 값을 재가중하여 모델의 입력 이미지에 대한 집중도를 편집 지시어에 상대적으로 조절함으로써 추가 조정 없이도 편집 강도에 대한 연속적이고 세밀한 제어를 가능하게 합니다. 기존 이미지 편집 프레임워크에서 수행한 폭넓은 실험을 통해 GRAG가 최소 네 줄의 코드만으로 통합 가능하며 편집 품질을 지속적으로 향상시킬 수 있음을 입증했습니다. 더불어 일반적으로 사용되는 Classifier-Free Guidance와 비교 시, GRAG는 편집 정도에 대해 더 부드럽고 정밀한 제어를 달성합니다. 우리의 코드는 https://github.com/little-misfit/GRAG-Image-Editing에서 공개될 예정입니다.
English
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.