一句话结论
PnP 从输入图像的 Stable Diffusion U-Net 轨迹抽取 decoder layer-4 spatial feature 与多层 self-attention,再注入目标文本分支,以无参数训练方式保结构地做 I2I;但真实图 inversion 和双 U-Net 分支使它 training-free 而非 cost-free。
问题定义
文本驱动 I2I 需要既大幅改变外观/语义,又保留输入形状、姿态、对象数量与布局。SDEdit 受 noising-level 权衡限制,Prompt-to-Prompt 依赖 source/target word alignment 且真实图 inversion 不稳。论文追问预训练 diffusion 内部 feature 能否直接成为结构控制接口。
方法概述
- 对真实输入做 DDIM inversion,并让 source/target 分支共用 $x_T$。
- source 分支每步提取 decoder layer 4 feature $f_t^4$ 与 self-attention $A_t^l$。
- target 文本分支覆盖对应 feature/attention;$\tau_f$、$\tau_A$ 控制注入时段。
- negative prompt 帮助 textureless primitive input 偏离原外观。
layer-4 feature 提供源/目标局部语义对应;更深 self-attention 保持细粒度结构。仅 feature 不够稳,仅 attention 缺语义对应,注入过深 feature 又会泄漏原外观。
Backbone、数据与设置
| 维度 | 全文核验 |
|---|---|
| 生成 backbone | Stable Diffusion v1.4 latent diffusion U-Net;非 DiT |
| 外部评测器 | DINO-ViT 衡量结构;CLIP 衡量文本;都不是生成主干 |
| Wild-TI2I | 148 pairs;53% real web guidance,其余为生成图 |
| ImageNet-R-TI2I | 10 类×3 图×5 prompts = 150 pairs |
| sampling | deterministic DDIM translation 50 steps;默认 $\tau_A=25,\tau_f=40$ |
| CFG | real 15.0;generated 7.5 |
| 训练 | 0;无微调、无新增参数 |
核心定量消融
| 配置 | Wild Real Self-Sim↓ | CLIP↑ | LPIPS↑ | Wild Gen Self-Sim↓ | CLIP↑ | LPIPS↑ |
|---|---|---|---|---|---|---|
| 无 feature | 0.090 | 0.288 | 0.584 | 0.084 | 0.297 | 0.633 |
| 无 self-attn | 0.097 | 0.286 | 0.597 | 0.090 | 0.295 | 0.657 |
| 完整方法 | 0.058 | 0.282 | 0.521 | 0.048 | 0.289 | 0.542 |
完整方法优化的是结构保持与文本/变化幅度的折中,不是所有单项最大。ImageNet-R 上完整方法为 0.051/0.275/0.462;无 feature 为 0.076/0.281/0.534,无 self-attn 为 0.089/0.278/0.564。
真实推理成本
- 参数训练/微调:0。
- 真实图实现使用 1000-step deterministic DDIM inversion;实现细节另报告 1000-step backward reconstruction,translation 为 50 steps。
- translation 每 timestep 运行 source/guidance 与 target 两条 U-Net 分支,约为普通单分支 50-step 采样的 2× U-Net forward count,另有 feature/attention 读写。
- 论文未报告 wall-clock、峰值显存或吞吐。因此不能用“plug-and-play/training-free”推导“高效”。
迁移与失败边界
- 依赖 source/target 在 diffusion feature space 具有语义对应;任意颜色 segmentation mask 会失败。
- textureless input 的 inversion 可能保留主导低频外观,造成 appearance leakage。
- 换 checkpoint 需重新选择 decoder layer、attention 层与阈值。
- 纯 DiT 没有同构 U-Net decoder layer 4/skip 接口,不能直接迁移。
- 未验证视频、长序列一致性、精确局部编辑或高分辨率部署。
相关页面
- 图像编辑
- 扩散模型
- DiffusionCLIP — 以每目标 U-Net 微调换复用;PnP 免训练但增加 inversion/双分支成本。
- EDICT — 代表后续更精确 inversion 接口。
备注
本库将其定位为 Stable Diffusion U-Net feature injection editing;DINO/CLIP 是评测实体,不能误挂为生成 backbone;source 不再关联 diffusion efficiency topic。