欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 房产 > 建筑 > Prompt-to-Prompt Image Editing with Cross Attention Control

Prompt-to-Prompt Image Editing with Cross Attention Control

2024/10/23 23:29:03 来源:https://blog.csdn.net/weixin_44994838/article/details/143134431  浏览:    关键词:Prompt-to-Prompt Image Editing with Cross Attention Control
  • https://arxiv.org/pdf/2208.01626
  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 jth的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:在这里插入图片描述

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com