Leveraging Latent Vector Prediction for Localized Control in Image Generation via Diffusion Models
Pablo Domingo-Gregorio, Javier Ruiz-Hidalgo
TL;DR
The paper tackles the challenge of fine-grained local control in diffusion-based image generation by introducing a latent-space conditioning framework that localizes guidance to user-defined regions. It combines masking-based conditioning applied to T2I-Adapter features, prediction of the initial latent vector $\hat{z}_0$ at each step, and a Sobel-based similarity loss to enforce alignment inside the region of interest while preserving creative generation elsewhere. Empirical results on a large LAION-based dataset show improved fidelity within the ROI (lower DMSE_in) and controlled background generation (moderate DMSE_out) with competitive FID and CLIPScore compared to global-condition baselines like T2I-Adapter and ControlNet. The approach is efficient, compatible with existing diffusion models, and offers a practical pathway to precise, localized image editing and synthesis, with future work exploring color conditioning, attention-based localization, and hierarchical constraints.
Abstract
Diffusion models emerged as a leading approach in text-to-image generation, producing high-quality images from textual descriptions. However, attempting to achieve detailed control to get a desired image solely through text remains a laborious trial-and-error endeavor. Recent methods have introduced image-level controls alongside with text prompts, using prior images to extract conditional information such as edges, segmentation and depth maps. While effective, these methods apply conditions uniformly across the entire image, limiting localized control. In this paper, we propose a novel methodology to enable precise local control over user-defined regions of an image, while leaving to the diffusion model the task of autonomously generating the remaining areas according to the original prompt. Our approach introduces a new training framework that incorporates masking features and an additional loss term, which leverages the prediction of the initial latent vector at any diffusion step to enhance the correspondence between the current step and the final sample in the latent space. Extensive experiments demonstrate that our method effectively synthesizes high-quality images with controlled local conditions.
