Skip to main content
QUICK REVIEW

[논문 리뷰] StyleDiffusion: Prompt-Embedding Inversion for Text-Based Editing

Senmao Li, Joost van de Weijer|arXiv (Cornell University)|2023. 03. 28.
Generative Adversarial Networks and Image Synthesis인용 수 12
한 줄 요약

StyleDiffusion은 실제 이미지에서 프롬프트 임베딩을 학습하여 교차 어텐션의 값 경로를 이용해 편집하며, 어텐션 정규화와 더 정확한 편집을 위해 무조건 분기(unconditional branch)도 사용하는 P2Plus 편집 스킴을 도입한다.

ABSTRACT

A significant research effort is focused on exploiting the amazing capacities of pretrained diffusion models for the editing of images.They either finetune the model, or invert the image in the latent space of the pretrained model. However, they suffer from two problems: (1) Unsatisfying results for selected regions and unexpected changes in non-selected regions.(2) They require careful text prompt editing where the prompt should include all visual objects in the input image.To address this, we propose two improvements: (1) Only optimizing the input of the value linear network in the cross-attention layers is sufficiently powerful to reconstruct a real image. (2) We propose attention regularization to preserve the object-like attention maps after reconstruction and editing, enabling us to obtain accurate style editing without invoking significant structural changes. We further improve the editing technique that is used for the unconditional branch of classifier-free guidance as used by P2P. Extensive experimental prompt-editing results on a variety of images demonstrate qualitatively and quantitatively that our method has superior editing capabilities compared to existing and concurrent works. See our accompanying code in Stylediffusion: \url{https://github.com/sen-mao/StyleDiffusion}.

연구 동기 및 목표

  • 확대된 프롬프트 엔지니어링이나 전체 모델 미세조정 없이 확정적으로 텍스트 지시로 실제 이미지를 편집하는 것을 동기화한다.
  • 키 브랜치를 고정하여 어텐션 맵을 보존하는 동안 입력 이미지를 프롬프트 임베딩(값 경로)으로 매핑한다.
  • 재구성 및 편집 충실도를 개선하기 위한 어텐션 정규화를 도입한다.
  • 대규모 구조 편집을 다루기 위해 무조건.self-attention 맵도 교환하는 향상된 편집 전략인 P2Plus를 개발한다.
  • 기준 방법 대비 주관적 및 정량적 지표에서 우수한 편집 정확도와 구조 보존을 실증적으로 시연한다.

제안 방법

  • DDIM 역(inversion)을 시작점으로 실제 이미지의 잠재 코드와 어텐션 맵을 얻는다.
  • 입력 이미지를 프롬프트 임베딩으로 매핑하여 교차 어텐션의 값 스트림으로 피드하되, 키 임베딩은 고정한다.
  • 역한(latent) 및 어텐션 맵의 재구성 손실과 어텐션 손실을 정렬하기 위해 재구성 손실(L_rec)과 어텐션 손실(L_att)을 갖는 매핑 네트워크 M_t를 학습한다.
  • P2Plus를 제안하여 조건부 및 무조건 분기에서 self-attention 맵을 대체하고(조정 가능한 주입 타임스텝 tau_u 포함) 더 충실한 구조적 편집을 달성한다.
  • P2P와 유사한 프롬프트-투-프롬프트 가이던스(및 그 무조건 분기 확장)를 사용하여 객체 수준 편집을 개선하고 배경 구조를 보존한다.

실험 결과

연구 질문

  • RQ1실제 이미지를 편집하면서 비편집 영역의 악화를 피하고 과도한 프롬프트 엔지니어링을 요구하지 않는 방법은 무엇인가?
  • RQ2교차 어텐션의 값 경로로 편집을 제한하여 구조를 보존하면서 대상 스타일 편집을 가능하게 할 수 있는가?
  • RQ3P2Plus를 통한 무조건 분기 어텐션의 도입이 P2P에 비해 대규모 구조 편집에 유리한가?
  • RQ4어텐션 정규화와 DDIM 기반 역이 기존 역(inversion) 방법보다 재구성 및 편집 가능성을 높이는가?

주요 결과

지표Structure-dist ↓NS-LPIPS ↓Clipscore ↑
DDIM0.0920.413181.9 %
SDEit0.0460.247378.0 %
Null-text0.0270.148075.2 %
Ours0.0260.116577.9 %
Inference Time (per timestep)---
  • StyleDiffusion은 정성적·정량적 지표에서 기준 방법보다 더 정확한 재구성 및 편집을 달성한다.
  • 어텐션 정규화는 재구성 충실도를 높이고 교차 어텐션 맵을 DDIM 역으로부터의 맵과 정렬한다.
  • 무조건 분기에도 주입하는 P2Plus 편집은 P2P보다 큰 구조 변화의 처리에 더 나은 성능을 보인다.
  • 100이미지 데이터셋에서 StyleDiffusion은 Structure-dist와 NS-LPIPS 점수에서 최고를 기록하고 Clipscore도 기준 방법과 경쟁력이 있다.
  • 추정 시점에서 재구성에 대해 높은 PSNR/SSIM을 유지하며 추정 시간 오버헤드는 modest하다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.