让CLIP直接在潜在空间工作,加速图像生成并过滤有害内容
Controlling Latent Diffusion Using Latent CLIP
- 将CLIP模型改造为在VAE潜空间运行,避免频繁解码
- 在ImageNet和生成数据上达到与原版CLIP相当的零样本分类性能
- 显著降低生成流程计算成本,适合需要高效控制的生成任务
传统扩散模型在图像域进行文本条件去噪,而潜空间扩散模型(LDM)则在变分自编码器(VAE)的潜空间中操作,实现更低的计算开销。然而,多数图像处理任务中使用的对比语言-图像预训练(CLIP)模型仍基于像素空间,需对潜空间图像进行昂贵的VAE解码才能处理。本文提出在潜空间直接运行的Latent-CLIP,基于27亿对潜图像与描述文本进行训练。实验表明,其在ImageNet及由LDM生成的版本上,零样本分类性能与同规模原始CLIP相当,证明其能有效评估真实与生成内容。进一步地,构建基于Latent-CLIP的奖励用于基于奖励的噪声优化(ReNO),在GenEval与T2I-CompBench上表现媲美原版CLIP,同时整体管道成本降低21%。最后,用Latent-CLIP引导生成避开有害内容,在I2P基准和自定义评估中表现优异,全程无需解码中间图像。
原文摘要 · Abstract (English)
Instead of performing text-conditioned denoising in the image domain, latent diffusion models (LDMs) operate in latent space of a variational autoencoder (VAE), enabling more efficient processing at reduced computational costs. However, while the diffusion process has moved to the latent space, the contrastive language-image pre-training (CLIP) models, as used in many image processing tasks, still operate in pixel space. Doing so requires costly VAE-decoding of latent images before they can be processed. In this paper, we introduce Latent-CLIP, a CLIP model that operates directly in the latent space. We train Latent-CLIP on 2.7B pairs of latent images and descriptive texts, and show that it matches zero-shot classification performance of similarly sized CLIP models on both the ImageNet benchmark and a LDM-generated version of it, demonstrating its effectiveness in assessing both real and generated content. Furthermore, we construct Latent-CLIP rewards for reward-based noise optimization (ReNO) and show that they match the performance of their CLIP counterparts on GenEval and T2I-CompBench while cutting the cost of the total pipeline by 21%. Finally, we use Latent-CLIP to guide generation away from harmful content, achieving strong performance on the inappropriate image prompts (I2P) benchmark and a custom evaluation, without ever requiring the costly step of decoding intermediate images.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。