# IP-Adapter ## 论文 `IP-Adapter: Text Compatible Image Prompt Adapter for Text-to-Image Diffusion Models` * https://arxiv.org/abs/2308.06721 ## 模型结构 该模型在`Stable Diffusion`模型的基础上添加`Linear+LN+Cross-Attention`引入图像特征。  ## 算法原理 该算法引入用于学习图像特征的`Cross-Attention`,其与文本`Cross-Attention`共用`Query`,并学习`Key, Value`权重,通过该模块的输出值与文本模块的输出值相加后作为`Unet`的条件输入。