TL;DR
CL-Gen introduces a closed-loop control framework to image generation, using a modified PID (Proportional-Integral-Derivative) controller to iteratively refine images during inference. By treating the generation process as a control problem, it achieves significantly better alignment with reference conditions—like identity, pose, or depth—without requiring any additional model training.
What Problem Does This Paper Address?
While text-to-image diffusion models have become incredibly powerful, "controllable" generation remains a challenge. Current state-of-the-art methods like ControlNet or IP-Adapter operate as open-loop systems: they take a reference (like a face or a pose map), process it once, and generate an image.
The problem is that there is no "sanity check." If the generated image doesn't quite match the reference—perhaps the face looks slightly different or the pose is a bit off—the system has no way to see that error and correct it. The fidelity of the result depends entirely on the model's pre-trained capabilities. CL-Gen aims to bridge this gap by introducing a feedback mechanism that observes the output and adjusts the input until the generation matches the target.
Methods
The authors draw direct inspiration from classical control theory, specifically the Closed-Loop Control System. Their framework, CL-Gen, consists of four main components:
- The Control Plant: This is the pre-trained diffusion model (e.g., SDXL with an IP-Adapter).
- The Sensor: A feature extractor that "observes" the generated image. For portraits, they use InsightFace; for poses, OpenPose; and for depth, MiDaS.
- The Reference: The target state derived from the user's input image.
- The Controller (Modified PID): This is the "brain" of the system.
Standard PID controllers are designed for dynamic systems that have "memory" of their previous states. However, image generation is a static system—each inference run is independent. To solve this, the authors proposed a modified PID algorithm that incorporates the reference state at every iteration.
During inference, the system generates an initial image, the sensor measures how far it is from the reference, and the PID controller calculates a "corrective signal." This signal adjusts the input for the next iteration. This process repeats (typically 15-20 times) until the output converges toward the reference.
Datasets
The researchers evaluated CL-Gen across three primary tasks using several datasets:
- ID-Preserving Portrait Generation: They used Web100 (130 identities from social media) and CelebA300 (300 random identities from CelebA-HQ).
- Pose and Depth Control: They utilized a filtered version of a public dataset (hosted on HuggingFace as
open_pose_controlnet), focusing on 477 single-person photos to ensure clean metrics.
Key Insights and Ideas
- Generation as a Control Problem: The most significant "aha moment" is the conceptual shift from seeing image generation as a single-shot task to seeing it as a target-tracking problem. This opens the door for decades of control theory research to be applied to AI.
- Static vs. Dynamic Systems: The realization that standard PID doesn't work for diffusion models because they lack "state memory" led to a crucial technical modification. By re-injecting the reference state at each step, they made classical control logic compatible with modern neural networks.
- Zero Training Cost: Unlike other consistency-improvement methods that require fine-tuning or massive new datasets, CL-Gen is a "plug-and-play" inference-time optimization. It requires adding only a few lines of code to existing pipelines.
Key Results
The quantitative improvements are substantial across the board:
- Identity Consistency: For portrait generation, the framework improved facial similarity by 12.07% on the Web100 dataset.
- Spatial Accuracy: Pose-controlled generation saw a 32.64% reduction in error, while depth-controlled generation errors dropped by 33.49%.
- Robustness: In "multi-round" experiments (where a generated image is used as the reference for the next round), CL-Gen significantly slowed down the "identity drift" that usually causes faces to morph and lose their original features over time.
- Convergence: Visualization shows that the most significant gains happen in the first few iterations, with the system stabilizing quickly.
Limitations and Future Work
- Manual Tuning: Currently, the PID coefficients ($K_p, K_i, K_d$) must be tuned manually for different tasks. The authors note that this increases the workload for practical applications.
- Inference Speed: Because the system is iterative (running the model multiple times per image), it is naturally slower and more computationally expensive than a single-pass generation.
- Future Directions: The authors plan to explore more advanced control algorithms that might automate parameter tuning and focus on optimizing the framework for faster convergence to reduce the time penalty.
Summary updated