Training-free Content Injection using h-space in Diffusion Models
Jaeseok Jeong, Mingi Kwon, Youngjung Uh
TL;DR
We address the challenge of controllability in pretrained diffusion models by proposing InjectFusion, a training-free method that injects content from a content image into a target image through blending the ${\bm{h}}$-space bottleneck and calibrating skip connections. The approach uses normalized spherical interpolation (Slerp) to blend ${\bm{h}}$-space features and introduces latent calibration to stabilize the reverse process, enabling realistic content transfer without fine-tuning or external networks. Quantitative (FID, ID, GRAM) and qualitative analyses demonstrate that InjectFusion preserves original image content while integrating content from the exemplar, outperforming related methods, particularly when color distributions differ significantly. The method expands the practical toolkit for diffusion-model-based editing, offering a lightweight, training-free path to content-aware image synthesis with broad applicability and local control via masks, though it faces limitations from the relatively low spatial resolution of ${\bm{h}}$-space and challenges with out-of-domain content.
Abstract
Diffusion models (DMs) synthesize high-quality images in various domains. However, controlling their generative process is still hazy because the intermediate variables in the process are not rigorously studied. Recently, the bottleneck feature of the U-Net, namely $h$-space, is found to convey the semantics of the resulting image. It enables StyleCLIP-like latent editing within DMs. In this paper, we explore further usage of $h$-space beyond attribute editing, and introduce a method to inject the content of one image into another image by combining their features in the generative processes. Briefly, given the original generative process of the other image, 1) we gradually blend the bottleneck feature of the content with proper normalization, and 2) we calibrate the skip connections to match the injected content. Unlike custom-diffusion approaches, our method does not require time-consuming optimization or fine-tuning. Instead, our method manipulates intermediate features within a feed-forward generative process. Furthermore, our method does not require supervision from external networks. The code is available at https://curryjung.github.io/InjectFusion/
