不用改模型结构,一套方法搞定各类图像生成任务。
Do We Need to Design Specific Diffusion Models for Different Tasks? Try ONE-PIC
- 用一张图拼接源图和目标图,让模型在上下文中学习任务
- 统一多种生成任务为遮蔽区域预测,性能超越专用模型
- 无需额外模块,适合快速部署与非专业用户使用
大型预训练扩散模型在图像生成方面表现优异,并已适应多种下游任务。然而,与可基于指令数据在单一模型中学习多任务的大型语言模型不同,扩散模型通常需要额外分支、特定训练策略和损失函数来有效适配不同任务。这种任务特异性微调方式带来两个问题:1)额外网络导致预训练与微调间的知识传递断层;2)需精心设计附加模块,增加学习门槛,降低易用性。因此,我们提出 ONE-PIC,通过不引入额外模块的方式增强预训练扩散模型的生成能力。具体地,提出“视觉上下文微调”方法,将源图像与目标图像拼接为单张图像构造任务特定训练数据,使微调更贴近预训练,提升适应速度。同时提出“掩码策略”,将各类生成任务统一为对掩码区域的预测。大量实验表明,该方法简单高效,显著简化适配流程,以更低成本实现优异性能。代码已公开于 https://github.com/tobran/ONE-PIC。
原文摘要 · Abstract (English)
Large pretrained diffusion models have demonstrated impressive generation capabilities and have been adapted to various downstream tasks. However, unlike Large Language Models (LLMs) that can learn multiple tasks in a single model based on instructed data, diffusion models always require additional branches, task-specific training strategies, and losses for effective adaptation to different downstream tasks. This task-specific fine-tuning approach brings two drawbacks. 1) The task-specific additional networks create gaps between pretraining and fine-tuning which hinders the transfer of pretrained knowledge. 2) It necessitates careful additional network design, raising the barrier to learning and implementation, and making it less user-friendly. Thus, a question arises: Can we achieve a simple, efficient, and general approach to fine-tune diffusion models? To this end, we propose ONE-PIC. It enhances the inherited generative ability in the pretrained diffusion models without introducing additional modules. Specifically, we propose In-Visual-Context Tuning, which constructs task-specific training data by arranging source images and target images into a single image. This approach makes downstream fine-tuning closer to the pertaining, allowing our model to adapt more quickly to various downstream tasks. Moreover, we propose a Masking Strategy to unify different generative tasks. This strategy transforms various downstream fine-tuning tasks into predictions of the masked portions. The extensive experimental results demonstrate that our method is simple and efficient which streamlines the adaptation process and achieves excellent performance with lower costs. Code is available at https://github.com/tobran/ONE-PIC.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。