Late-Constraint Diffusion Guidance for Controllable Image Synthesis

19 May 2023  ·  Chang Liu, Dong Liu ·

Diffusion models, either with or without text condition, have demonstrated impressive capability in synthesizing photorealistic images given a few or even no words. These models may not fully satisfy user need, as normal users or artists intend to control the synthesized images with specific guidance, like overall layout, color, structure, object shape, and so on. To adapt diffusion models for controllable image synthesis, several methods have been proposed to incorporate the required conditions as regularization upon the intermediate features of the diffusion denoising network. These methods, known as early-constraint ones in this paper, have difficulties in handling multiple conditions with a single solution. They intend to train separate models for each specific condition, which require much training cost and result in non-generalizable solutions. To address these difficulties, we propose a new approach namely late-constraint: we leave the diffusion networks unchanged, but constrain its output to be aligned with the required conditions. Specifically, we train a lightweight condition adapter to establish the correlation between external conditions and internal representations of diffusion models. During the iterative denoising process, the conditional guidance is sent into corresponding condition adapter to manipulate the sampling process with the established correlation. We further equip the introduced late-constraint strategy with a timestep resampling method and an early stopping technique, which boost the quality of synthesized image meanwhile complying with the guidance. Our method outperforms the existing early-constraint methods and generalizes better to unseen condition. Our code would be available.

PDF Abstract
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Conditional Text-to-Image Synthesis COCO 2017 val LCDG FID 20.27 # 1
Conditional Text-to-Image Synthesis COCO 2017 val T2I-Adapter (Color, evaluated under color stroke) FID 30.84 # 9
Conditional Text-to-Image Synthesis COCO 2017 val SD using SDEdit (evaluated under image palette) CLIP Score 0.2138 # 8
Conditional Text-to-Image Synthesis COCO 2017 val SD using SDEdit (evaluated under color stroke) FID 32.93 # 10
CLIP Score 0.2257 # 7
Conditional Text-to-Image Synthesis COCO 2017 val LCDG (Color, evaluated under image palette) FID 20.61 # 2
CLIP Score 0.2580 # 4
Conditional Text-to-Image Synthesis COCO 2017 val T2I-Adapter (Color, evaluated under image palette) FID 26.54 # 6
CLIP Score 0.2613 # 3
Conditional Text-to-Image Synthesis COCO 2017 val LCDG (Mask) FID 20.94 # 3
CLIP Score 0.2617 # 2
Conditional Text-to-Image Synthesis COCO 2017 val SD (text) FID 27.99 # 7
CLIP Score 0.2673 # 1
Conditional Text-to-Image Synthesis COCO 2017 val SD using SDEdit FID 71.16 # 11
Conditional Text-to-Image Synthesis COCO 2017 val LCDG (Edge) FID 21.02 # 4
Conditional Text-to-Image Synthesis COCO 2017 val T2I-Adapter (Sketch) FID 21.72 # 5
CLIP Score 0.2580 # 4
Conditional Text-to-Image Synthesis COCO 2017 val ControlNet (HED Edge) FID 28.09 # 8
CLIP Score 0.2525 # 6

Methods