Diffusion models have made significant progress in both text-to-image (T2I) generation and text-guided image editing. However, these models are typically built with billions of parameters, leading to high latency and increased deployment challenges. While on-device diffusion models improve efficiency, they largely focus on T2I generation and lack support for image editing. In this paper, we propose DreamLite, a compact unified on-device diffusion model (0.39B) that supports both T2I generation and text-guided image editing within a single network. DreamLite is built on a pruned mobile U-Net backbone and unifies conditioning through in-context spatial concatenation in the latent space. It concatenates images horizontally as input, using a (target | blank) configuration for generation tasks and (target | source) for editing tasks. To stabilize the training of this compact model, we introduce a task-progressive joint pretraining strategy that sequentially targets T2I, editing, and joint tasks. After high-quality SFT and reinforcement learning, DreamLite achieves GenEval (0.72) for image generation and ImgEdit (4.11) for image editing, outperforming existing on-device models and remaining competitive with several server-side models. By employing step distillation, we further reduce denoising processing to just 4 steps, enabling our DreamLite could generate or edit a 1024 x 1024 image in less than 1s on a Xiaomi 14 smartphone. To the best of our knowledge, DreamLite is the first unified on-device diffusion model that supports both image generation and image editing.
翻译:扩散模型在文本到图像(T2I)生成和文本引导的图像编辑方面取得了显著进展。然而,这些模型通常拥有数十亿参数,导致高延迟和部署难度增加。尽管设备端扩散模型提升了效率,但它们大多专注于T2I生成,缺乏对图像编辑的支持。在本文中,我们提出DreamLite,一种紧凑且统一的小型设备端扩散模型(0.39B),在单一网络内同时支持T2I生成和文本引导的图像编辑。DreamLite基于剪枝后的移动U-Net骨干网络构建,并通过潜在空间中的上下文空间拼接统一条件控制。它将图像水平拼接作为输入,采用(目标 | 空白)配置用于生成任务,(目标 | 源)配置用于编辑任务。为稳定这一紧凑模型的训练,我们引入了一种任务渐进式联合预训练策略,依次针对T2I、编辑和联合任务进行训练。经过高质量SFT和强化学习后,DreamLite在图像生成上达到GenEval(0.72),在图像编辑上达到ImgEdit(4.11),性能超越现有设备端模型,并与多个服务器端模型保持竞争力。通过采用步蒸馏,我们将去噪处理进一步减少至仅4步,使得DreamLite能够在小米14智能手机上以不到1秒的时间生成或编辑一张1024×1024的图像。据我们所知,DreamLite是首个同时支持图像生成与图像编辑的统一设备端扩散模型。