Prompt-to-Prompt Image Editing with Cross Attention Control

  1. 问题引入
  • 通过manipulate cross attn map的方式来实现图片编辑的任务;
  1. methods
  • 编辑前后的图片以及prompt I , I ∗ , P , P ∗ I,I^*,P,P^* I,I∗,P,P∗,在cross attn中,pixel feature ϕ ( z t ) \phi(z_t) ϕ(zt)得到 Q = l Q ( ϕ ( z t ) ) Q = l_Q(\phi(z_t)) Q=lQ(ϕ(zt)), K = l K ( ψ ( P ) ) , v = l V ( ψ ( P ) ) K = l_K(\psi(P)),v = l_V(\psi(P)) K=lK(ψ(P)),v=lV(ψ(P)),得到atten map M M M,其中 M i j M_{ij} Mij表示的是 j − t h j-th j−th的token和pixel i i i之间的关系;
  • 编辑的算法如下:
  • 其中 E d i t ( M t , M t ∗ , t ) Edit(M_t,M_t^*,t) Edit(Mt,Mt∗,t)根据任务不同定义如下:
  • word swap:
  • Adding a New Phrase:
  • Attention Re--weighting:
相关推荐
胡玉洋2 天前
从新手到高手:全面解析 AI 时代的「魔法咒语」——Prompt
人工智能·ai·prompt·transformer·协议
L_cl2 天前
【NLP 72、Prompt、Agent、MCP、function calling】
prompt
Lilith的AI学习日记2 天前
Claude官方63组提示词模板全解析:从工作到生活的AI应用指南
人工智能·prompt·生活·ai编程·claude
java干货3 天前
每日Prompt:超现实交互场景
prompt
java干货3 天前
每日Prompt:发光线条解剖图
prompt
AI大模型顾潇3 天前
[特殊字符] 本地大模型编程实战(29):用大语言模型LLM查询图数据库NEO4J(2)
前端·数据库·人工智能·语言模型·自然语言处理·prompt·neo4j
java干货3 天前
每日Prompt:三只动物与地标自拍
prompt
0x2113 天前
[论文阅读]Formalizing and Benchmarking Prompt Injection Attacks and Defenses
论文阅读·prompt
java干货4 天前
每日Prompt:定制动漫手办
prompt
AIWritePaper智能写作探索5 天前
高质量学术引言如何妙用ChatGPT?如何写提示词?
人工智能·chatgpt·prompt·智能写作·aiwritepaper·引言