用冻结的视觉语言模型做统一编码器,提升图像生成与编辑性能。
UniFusion: Vision-Language Model as Unified Encoder in Image Generation
- 通过分层注意力池化提取图文特征,实现跨模态统一编码。
- 在单图编辑任务上微调后可零样本泛化到多参考图像,显著提升迁移能力。
- 支持推理时灵活重写提示,增强生成可控性,适合图像编辑场景。
尽管视觉生成领域进展显著,但现有架构仍依赖独立的图像和文本编码器,限制了扩散模型的跨模态推理与知识迁移能力。以往方法多使用视觉语言模型(VLM)最后一层信息、多个视觉编码器或联合训练大规模统一模型,需大量计算资源与数据,难以普及。本文提出UniFusion,一种基于扩散模型、以冻结大视觉语言模型为统一多模态编码器的生成模型。核心是分层注意力池化(LAP)机制,从冻结VLM的文本与视觉标记中同时提取高层语义与低层细节,用于条件扩散生成。实验表明,LAP在图文对齐与视觉信息传递方面优于浅层融合结构。我们还提出VLM-Enabled Rewriting Injection with Flexible Inference(VERIFI),仅在模型内提示重写阶段使用VLM生成的文本标记来条件扩散变压器(DiT),结合了条件分布对齐与VLM推理能力,提升推理灵活性。此外,微调编辑任务不仅增强了生成时的图文对齐,体现跨模态知识迁移,还展现出极强泛化能力:仅在单图编辑上训练,即可零样本泛化至多参考图像,进一步验证了统一编码器设计的有效性。
原文摘要 · Abstract (English)
Although recent advances in visual generation have been remarkable, most existing architectures still depend on distinct encoders for images and text. This separation constrains diffusion models' ability to perform cross-modal reasoning and knowledge transfer. Prior attempts to bridge this gap often use the last layer information from VLM, employ multiple visual encoders, or train large unified models jointly for text and image generation, which demands substantial computational resources and large-scale data, limiting its accessibility.We present UniFusion, a diffusion-based generative model conditioned on a frozen large vision-language model (VLM) that serves as a unified multimodal encoder. At the core of UniFusion is the Layerwise Attention Pooling (LAP) mechanism that extracts both high level semantics and low level details from text and visual tokens of a frozen VLM to condition a diffusion generative model. We demonstrate that LAP outperforms other shallow fusion architectures on text-image alignment for generation and faithful transfer of visual information from VLM to the diffusion model which is key for editing. We propose VLM-Enabled Rewriting Injection with Flexibile Inference (VERIFI), which conditions a diffusion transformer (DiT) only on the text tokens generated by the VLM during in-model prompt rewriting. VERIFI combines the alignment of the conditioning distribution with the VLM's reasoning capabilities for increased capabilities and flexibility at inference. In addition, finetuning on editing task not only improves text-image alignment for generation, indicative of cross-modality knowledge transfer, but also exhibits tremendous generalization capabilities. Our model when trained on single image editing, zero-shot generalizes to multiple image references further motivating the unified encoder design of UniFusion.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。