REFINE-CONTROL: A Semi-supervised Distillation Method For Conditional Image Generation

Yicheng Jiang, Jin Yuan, Hua Yuan, Yao Zhang, Yong RuiarXiv 2025 · DOI

Introduction

Controllable text-to-image models, such as ControlNet, have significantly advanced image generation by enabling pixel-level guidance through modalities like inpainting, depth maps, and poses. However, deploying these models in real-world applications remains challenging due to their massive computational requirements, the scarcity of high-quality annotated data, and the architectural difficulties inherent in distilling large teacher models into smaller, efficient student versions.

Refine-Control is a novel two-stage distillation framework designed to address these hurdles. By combining a "tri-level" knowledge fusion loss with semi-supervised fine-tuning, the authors successfully produced a 12-layer student model that nearly matches the performance of a 23-layer teacher while significantly reducing computational overhead for edge deployment.

The Refine-Control Framework

The core of Refine-Control is a two-stage pipeline that decouples the learning of basic task mappings from the complex generative logic of the teacher model.

The Refine-Control distillation framework, illustrating the interaction between the trainable student and frozen teacher models across two stages.

1. Two-Stage Pipeline

  • Stage 1 (Supervised): The student model is first trained on a fully annotated dataset to learn the fundamental mapping from conditions (e.g., masks) to outputs.
  • Stage 2 (Self-Supervised): The model is then refined using a larger, unlabeled dataset. In this stage, the student relies on the teacher’s guidance rather than ground-truth labels, allowing it to improve generalization and capture the nuanced generative capabilities of the larger model.

2. Tri-Level Knowledge Fusion Loss

To bridge the structural gap between a 12-layer student and a 23-layer teacher, the framework employs three distinct loss functions:

  • Mask-Weighted Task Loss ($L_{task}$): A Flow Matching objective that prioritizes the inpainting region, forcing the model to focus on areas where content is actually being modified.
  • Output Distillation Loss ($L_{distill}$): The student aims to replicate the final denoising output of the teacher model.
  • Asymmetric Feature Loss ($L_{af}$): This serves as the structural bridge. Using a many-to-one feature alignment, each student layer learns from the aggregated features of two corresponding teacher layers, ensuring a comprehensive transfer of semantic information despite the shallower architecture.

Enhancing Precision with Local Prompts

Standard global prompts (e.g., "two horses in the snow") can lead to ambiguity during inpainting, as the model may struggle to identify which specific object requires editing. To solve this, the authors introduced local prompts—descriptions focused specifically on the masked area (e.g., "one white fluffy pony").

Comparison of inpainting results using global vs. local prompts. Local prompts provide more precise control in multi-object scenes.

This shift from global to local context significantly enhances controllability in complex scenes, preventing the model from generating irrelevant or mismatched content in the edited region.

Experimental Results

The researchers evaluated Refine-Control using SD3-Inpainting-ControlNet (23 layers) as the teacher and a 12-layer student initialized from SD3-medium. The datasets were constructed using LAION-2B and refined with vision-language models like Qwen2.5-VL to generate precise local prompts.

  • Performance: The 12-layer student achieved a PSNR of 19.25, remarkably close to the teacher's 19.71, despite having roughly half the layers.
  • Distillation Efficacy: Training the same 12-layer architecture from scratch resulted in a significantly lower PSNR (17.78), highlighting the necessity of the distillation framework.
  • Efficiency: The student model offers substantial reductions in latency and computational cost, making it a viable candidate for deployment on mobile and edge devices.

Conclusion and Future Work

Refine-Control demonstrates that many-to-one feature injection and semi-supervised refinement can effectively bridge the gap between massive controllable models and efficient student architectures. While the current work focuses on image inpainting, the framework is theoretically generalizable to other control modalities like depth maps or poses. Future research may focus on further automating the data pipeline and exploring the framework's performance as foundational teacher models continue to evolve.

Summary updated

BibTeX
@misc{jiang2025refine,
  author = {Yicheng Jiang and Jin Yuan and Hua Yuan and Yao Zhang and Yong Rui},
  title = {{REFINE-CONTROL: A Semi-supervised Distillation Method For Conditional Image Generation}},
  year = {2025},
  eprint = {2509.22139},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.22139},
}
Figure