Skip to main content
QUICK REVIEW

[论文解读] FreeStyle: Free Lunch for Text-guided Style Transfer using Diffusion Models

Feihong He, Gang Li|arXiv (Cornell University)|Jan 28, 2024
Natural Language Processing TechniquesComputer Science被引用 3
一句话总结

FreeStyle 提出了一种无需训练、无需参考图像的文本引导风格迁移方法,通过引入双流编码器与单流解码器,将内容与风格特征解耦,利用预训练的扩散模型实现。该方法在无需优化或风格图像的情况下,实现了最先进的风格迁移质量、内容保留度与美学保真度,仅依赖文本提示和可调节的缩放因子。

ABSTRACT

The rapid development of generative diffusion models has significantly advanced the field of style transfer. However, most current style transfer methods based on diffusion models typically involve a slow iterative optimization process, e.g., model fine-tuning and textual inversion of style concept. In this paper, we introduce FreeStyle, an innovative style transfer method built upon a pre-trained large diffusion model, requiring no further optimization. Besides, our method enables style transfer only through a text description of the desired style, eliminating the necessity of style images. Specifically, we propose a dual-stream encoder and single-stream decoder architecture, replacing the conventional U-Net in diffusion models. In the dual-stream encoder, two distinct branches take the content image and style text prompt as inputs, achieving content and style decoupling. In the decoder, we further modulate features from the dual streams based on a given content image and the corresponding style text prompt for precise style transfer. Our experimental results demonstrate high-quality synthesis and fidelity of our method across various content images and style text prompts. Compared with state-of-the-art methods that require training, our FreeStyle approach notably reduces the computational burden by thousands of iterations, while achieving comparable or superior performance across multiple evaluation metrics including CLIP Aesthetic Score, CLIP Score, and Preference. We have released the code at: https://github.com/FreeStyleFreeLunch/FreeStyle.

研究动机与目标

  • 解决现有基于扩散模型的风格迁移方法因需要微调或文本反转而导致的高计算成本与缓慢优化过程问题。
  • 实现无需参考风格图像的文本引导风格迁移,使无法获取艺术作品的用户也能轻松使用。
  • 通过在预训练扩散模型中采用双流架构解耦内容与风格表征,实现高质量的风格迁移。
  • 在实现内容强保留与艺术风格一致性的同时,无缝集成至现有的大规模文本到图像扩散模型(如 SDXL)中。

提出的方法

  • FreeStyle 使用双流编码器,分别处理内容图像与风格文本提示,提取内容与风格的模态特定特征。
  • 该方法采用单流解码器,通过两个缩放因子融合并调制来自两路的特征:一个用于控制风格迁移强度,另一个用于控制内容保留度。
  • 缩放因子 b 和 s 用于平衡低频(内容)与高频(风格)特征,受 FreeU 启发,以提升生成质量。
  • 该框架无需参数更新,完全依赖预训练扩散模型(如 SDXL)固有的风格生成能力。
  • 超参数 σ、b 和 s 经调优以控制噪声注入与特征调制,其中 σ 控制去噪过程中噪声水平。
  • 通过重用 U-Net 模块避免引入新参数,确保兼容性与高效性。
Figure 1: Illustration depicting process distinctions among Finetune-based, Inversion-based, and our FreeStyle. (a) Fine-tuning the entire model or specific parameters allows embedding a given visual style into the output domain of the generated diffusion model. (b) Embed specific style or content i
Figure 1: Illustration depicting process distinctions among Finetune-based, Inversion-based, and our FreeStyle. (a) Fine-tuning the entire model or specific parameters allows embedding a given visual style into the output domain of the generated diffusion model. (b) Embed specific style or content i

实验结果

研究问题

  • RQ1能否在无需任何优化或参考风格图像的情况下实现文本引导风格迁移?
  • RQ2预训练扩散模型仅通过文本提示能否有效生成多样化的艺术风格?
  • RQ3在扩散模型中,通过双流架构在多大程度上可实现内容与风格的解耦?
  • RQ4该方法在缩放因子与噪声注入的超参数变化下是否具备鲁棒性?
  • RQ5该方法在定量与定性指标上是否优于现有的基于优化与反演的风格迁移技术?

主要发现

  • FreeStyle 在 CLIP 美学评分(6.3148)与 CLIP 分数(25.615)上均达到最高,优于所有基线方法,包括 CLIPstyler、CAST 与 UDT2I。
  • 在人类偏好评估中,FreeStyle 在 54.6% 的对比中排名第一,显著优于其他方法。
  • 该方法对超参数变化表现出强鲁棒性,最优性能出现在 b=2.5 与 s=1 时,且在广泛参数设置下保持稳定结果。
  • 通过在内容输入中增加噪声(ρ=999)验证了内容-风格解耦:内容信息被消除,而风格特征(如笔触与线条)得以保留。
  • 当 σ 超过 850 时,风格迁移质量提升,但当 σ 过小时性能急剧下降,表明去噪过程中对噪声水平高度敏感。
  • FreeStyle 在无需任何微调、反演或参考图像的情况下实现最先进性能,标志着向真正‘免费午餐’式风格迁移迈出了关键一步。
Figure 2: The overview of our FreeStyle Framework. (a) Model Structure of FreeStyle. Our dual-stream encoder generates the content feature $f_{c}$ guided by the input content image $x_{0}$ , and the style feature $f_{s}$ guided by the input style text prompt and noisy image $x_{\sigma}$ . In the sin
Figure 2: The overview of our FreeStyle Framework. (a) Model Structure of FreeStyle. Our dual-stream encoder generates the content feature $f_{c}$ guided by the input content image $x_{0}$ , and the style feature $f_{s}$ guided by the input style text prompt and noisy image $x_{\sigma}$ . In the sin

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。