[논문 리뷰] Dynamic Prompt Learning: Addressing Cross-Attention Leakage for Text-Based Image Editing
DPL은 cross-attention 누수를 줄이기 위해 타임스탬프별로 동적 명사 토큰을 학습하여, 배경 및 방해 영역을 보존하면서 대상 객체를 정밀하게 편집할 수 있도록 diffusion 기반 이미지 편집을 가능하게 한다.
Large-scale text-to-image generative models have been a ground-breaking development in generative AI, with diffusion models showing their astounding ability to synthesize convincing images following an input text prompt. The goal of image editing research is to give users control over the generated images by modifying the text prompt. Current image editing techniques are susceptible to unintended modifications of regions outside the targeted area, such as on the background or on distractor objects which have some semantic or visual relationship with the targeted object. According to our experimental findings, inaccurate cross-attention maps are at the root of this problem. Based on this observation, we propose Dynamic Prompt Learning (DPL) to force cross-attention maps to focus on correct noun words in the text prompt. By updating the dynamic tokens for nouns in the textual input with the proposed leakage repairment losses, we achieve fine-grained image editing over particular objects while preventing undesired changes to other image regions. Our method DPL, based on the publicly available Stable Diffusion, is extensively evaluated on a wide range of images, and consistently obtains superior results both quantitatively (CLIP score, Structure-Dist) and qualitatively (on user-evaluation). We show improved prompt editing results for Word-Swap, Prompt Refinement, and Attention Re-weighting, especially for complex multi-object scenes.
연구 동기 및 목표
- 교차 주의 누수로 인해 텍스트 가이드 이미지 편집에서 의도치 않은 변화가 발생하는 문제를 제기한다.
- 편집 위치를 국소화하기 위해 타임스탬프별로 명사-단어 임베딩을 최적화하는 Dynamic Prompt Learning(DPL)을 제안한다.
- 배경 누수, 분리된 객체 주의, 주의 균형 손실 등 누수에 초점을 맞춘 손실 함수를 개발하여 교차 주의 맵을 정교하게 다룬다.
- 실제 이미지의 정확한 편집을 가능하게 하기 위해 Null-Text Inversion과 DDIM inversion을 활용한다.
- Stable Diffusion를 사용하여 다중 객체 실사진 프롬프트에서 향상된 편집 품질을 입증한다.
제안 방법
- 프롬프트의 명사 단어를 동적이며 타임스탬프 특定 토큰으로 변환한다.
- 교차 주의를 제약하기 위한 세 가지 손실을 도입한다: background leakage loss, disjoint object attention loss, 그리고 attention balancing loss.
- 점진적 임계값을 갖는 그래디언트 기반 최적화를 통해 타임스텝마다 토큰 임베딩을 업데이트하고, 주의 맵이 의도된 객체에 국한되도록 한다.
- Null-Text Inversion을 사용하여 재구성 충실도를 보존하면서 확산 경로를 근사한다.
- 다중 객체 장면에서 워드 스왑 및 기타 프롬프트 편집 작업을 평가하기 위해 P2P 스타일 편집과 함께 DPL을 통합한다.
- 배경 마스크를 self-attention 클러스터에서 도출하여 누수를 추가로 억제하는 옵션을 제공한다.
실험 결과
연구 질문
- RQ1동적이며 타임스텝별 토큰 최적화가 다중 객체 편집에서 교차 주의 로컬라이제이션을 향상시킬 수 있는가?
- RQ2배경 누수, 방해 객체 누수, 주의 균형 손실 등 누수-focused 손실이 기본선 대비 우수한 편집 품질을 산출하는가?
- RQ3P2P와 같은 기존 편집 프레임워크와 결합했을 때 실제 다중 객체 이미지에서 DPL의 성능은 어떠한가?
주요 결과
- DPL은 Null-Text inversion 기반선 대비 우수한 교차 주의 맵과 편집 품질을 제공하며, 특히 복잡한 다중 객체 장면에서 두드러진다.
- 정량 지표는 다중 객체 편집에서 DPL+P2P가 NTI+P2P 대비 더 높은 CLIP 점수와 더 낮은 Structure-Dist를 보임을 보여준다.
- 고찰 연구는 세 가지 손실(배경 누수, 분리된 객체 주의, 주의 균형)을 모두 결합하는 것이 최적의 로컬라이제이션 및 편집 결과를 제공함을 시사한다.
- DPL은 배경 및 방해 대상 객체에 대한 의도하지 않은 변화를 줄여 Word-Swap 및 Prompt Refinement 시나리오를 향상시킨다.
- 사용자 연구는 정량적 이점을 뒷받침하며, 다중 객체 편집에서 DPL+P2P가 NTI+P2P보다 선호된다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.