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:
相关推荐
m0_603888711 天前
Mitigating Long-Tail Bias via Prompt-Controlled Diffusion Augmentation
ai·prompt·论文速览
手揽回忆怎么睡2 天前
一套 Prompt 组合
prompt
AI Echoes2 天前
LangChain Runnable组件重试与回退机制降低程序错误率
人工智能·python·langchain·prompt·agent
wasp5202 天前
Banana Slides 深度解析:AI Core 架构设计与 Prompt 工程实践
人工智能·prompt·bash
小明_GLC2 天前
大模型幻觉以及如何设计合适的prompt回答用户问题
人工智能·prompt
彷徨的蜗牛2 天前
用 Claude Code 重新定义编程效率:从 Prompt 工程到完整项目实战
prompt·ai 编程·claude code
石去皿3 天前
Depth Viewer: 16-bit 深度图可视化工具
人工智能·chatgpt·prompt
猫头虎3 天前
2026全网最热Claude Skills工具箱,GitHub上最受欢迎的7大Skills开源AI技能库
langchain·开源·prompt·github·aigc·ai编程·agi
伊甸33 天前
基于LangChain4j从0到1搭建自己的的AI智能体并部署上线-1
java·langchain·prompt
汉克老师3 天前
小学生0基础学大语言模型应用(第 19 课《字符串提示词训练(Prompt Thinking)》)
人工智能·深度学习·机器学习·语言模型·prompt·提示词