Adding Conditional Control to Text-to-Image Diffusion Models

Lvmin Zhang, Anyi Rao, Maneesh Agrawala

2023 · ICCV

Adding Conditional Control to Text-to-Image Diffusion Models

Problem

Framing

Spatial conditions like edges, pose, or depth were hard to inject into large text-to-image diffusion models without destroying pretrained generation quality. ControlNet closes this gap by cloning locked U-Net blocks into trainable branches linked by zero-initialized convolutions, yielding robust control across canny, depth, segmentation, and pose conditions.

Currently Used Methods

Foundational

Proposed Method

Architecture

ControlNet augments each pretrained Stable Diffusion encoder block and middle block with a locked copy plus a trainable copy. The trainable branch consumes condition features and merges back through zero convolutions, so control starts at exactly zero and grows during finetuning.

A locked Stable Diffusion block is duplicated into a trainable copy, then reconnected through zero-initialized 1 \times 1 convolutions to inject condition features safely.

Loss / Objective

ControlNet keeps the base diffusion objective and optimizes the conditional denoiser with text condition ctc_t and spatial condition cfc_f:

L=Ez0,ct,cf,ϵ,t[ϵϵθ(zt,t,ct,cf)22]\mathcal{L} = \mathbb{E}_{\mathbf{z}_0, c_t, c_f, \epsilon, t}\left[\left\|\epsilon - \epsilon_\theta\left(\mathbf{z}_t, t, c_t, c_f\right)\right\|_2^2\right]

Sampling Rule

Sampling reuses the Stable Diffusion reverse process with the ControlNet-augmented noise predictor:

zt1pθ(zt1zt,ct,cf)\mathbf{z}_{t-1} \sim p_\theta\left(\mathbf{z}_{t-1}\mid \mathbf{z}_t, c_t, c_f\right)

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Table 1: Image quality metrics comparing Stable Diffusion variants

MethodFID ↓CLIP-score ↑CLIP-aes.↑
Stable Diffusion6.090.265.54
ControlNet-lite5.570.285.70
ControlNet5.160.295.83

Ablations

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers