<ul class="dashed" data-apple-notes-indent-amount="0"><li><span style="font-family: '.PingFangUITextSC-Regular'">文章标题:</span>PuLID: Pure and Lightning ID Customization via Contrastive Alignment</li><li><span style="font-family: '.PingFangSC-Regular'">文章地址:</span><a href="https://arxiv.org/abs/2404.16022">https://arxiv.org/abs/2404.16022</a> </li><li>NIPS 2024</li></ul> <img src="https://res.cloudinary.com/montaigne-io/image/upload/v1728483742/EC931C53-92B6-4E7B-B071-A086A8E4623E.png" style="background-color:initial;max-width:min(100%,2534px);max-height:min(2036px);;background-image:url(https://res.cloudinary.com/montaigne-io/image/upload/v1728483742/EC931C53-92B6-4E7B-B071-A086A8E4623E.png);height:auto;width:100%;object-fit:cover;background-size:cover;display:block;" width="2534" height="2036"> 文章提出了PuLID,一种全新的无需测试微调的ID定制化文生图的方法。通过将轻量的T2I模型分支与标准文生图结合,作者提出了对比对齐损失和精确的ID损失,最小化了定制化对原模型的的扰动并保证了高保真度。实验证明了模型在ID保真度和可编辑性上表现优异,并且模型展现了在结合ID或不结合ID信息时,除ID信息以外的信息(背景,光照等)基本保持一致。 文章指出现有的无需测试微调的方法面临两个问题:1、嵌入ID信息会对原模型的行为有影响:也就是说嵌入ID不仅仅会将模型原本输出的图像进行换脸,还会改变一些其他的内容。2、缺少ID保真度:扩散模型没法直接运用ID loss,因为人脸模型无法支持有噪声的图像,当前的方法是直接用当前的隐变量去预测原图,显然这样预测的原图质量不能得到保证。 具体来说,在将人脸进行编码的阶段没有什么特别的地方,同时使用人脸识别模型和CLIP的视觉编码器对人脸进行特征提取,然后经过MLP得到特征,再参考ELITE,将VIT一些中间层的特征也加入到最终的特征中。得到特征后,参考IP-Adapter,新建一组图像的K和V与隐变量进行交互融合,从而提取了特征并将其融合进基础模型中。文章的创新点主要还是在损失函数的设计上,其利用SDXL-Lighting进行快速采样将纯噪声和一组特定的prompt进行快速生成,然后将得到的UNet特征进行loss的计算:对比对齐loss和ID loss。对比对齐loss又分为语义对齐loss和布局对齐loss,计算如下图: <img src="https://res.cloudinary.com/montaigne-io/image/upload/v1728485177/E8EADFEA-E418-490B-AC0E-98AFACDA5A90.png" style="background-color:initial;max-width:min(100%,1240px);max-height:min(208px);;background-image:url(https://res.cloudinary.com/montaigne-io/image/upload/v1728485177/E8EADFEA-E418-490B-AC0E-98AFACDA5A90.png);height:auto;width:100%;object-fit:cover;background-size:cover;display:block;" width="1240" height="208"> <img src="https://res.cloudinary.com/montaigne-io/image/upload/v1728485177/B4707AD6-A3D0-4721-9088-9EFC22256E78.png" style="background-color:initial;max-width:min(100%,630px);max-height:min(152px);;background-image:url(https://res.cloudinary.com/montaigne-io/image/upload/v1728485177/B4707AD6-A3D0-4721-9088-9EFC22256E78.png);height:auto;width:100%;object-fit:cover;background-size:cover;display:block;" width="630" height="152"> 然后将轻量T2I分支生成的原图和参考的图像进行ID loss的计算。 <img src="https://res.cloudinary.com/montaigne-io/image/upload/v1728485382/448D2249-7438-4EAC-AD56-0EE3DB58967F.png" style="background-color:initial;max-width:min(100%,1026px);max-height:min(154px);;background-image:url(https://res.cloudinary.com/montaigne-io/image/upload/v1728485382/448D2249-7438-4EAC-AD56-0EE3DB58967F.png);height:auto;width:100%;object-fit:cover;background-size:cover;display:block;" width="1026" height="154"> 效果图: <img src="https://res.cloudinary.com/montaigne-io/image/upload/v1728485382/1568AE10-00E6-4CCA-8633-CE4F0C907956.png" style="background-color:initial;max-width:min(100%,1886px);max-height:min(1612px);;background-image:url(https://res.cloudinary.com/montaigne-io/image/upload/v1728485382/1568AE10-00E6-4CCA-8633-CE4F0C907956.png);height:auto;width:100%;object-fit:cover;background-size:cover;display:block;" width="1886" height="1612"> <ul class="dashed" data-apple-notes-indent-amount="0"><li>数据:网上收集的一百五十万张人类图片,BLIP2进行caption生成</li><li><span style="font-family: '.PingFangUITextSC-Regular'">指标:</span>ID<span style="font-family: '.PingFangUITextSC-Regular'">相似度(</span>CurricularFace)</li><li>硬件:8 A100</li><li>开源:<a href="https://github.com/ToTheBeginning/PuLID">https://github.com/ToTheBeginning/PuLID</a> </li></ul>