Query-Query Alignment
Zero-shot appearance transfer relies on cross-attention to map the appearance of a reference image to a target structure. Existing diffusion-based methods rely on query–key attention, which often suffers from attention leakage—unintended texture spillover to unrelated regions.
Q-Align introduces Query–Query alignment to compute a clean semantic correspondence between source and reference images. Instead of matching queries to keys, we directly align queries in the shared feature space of the diffusion model, enabling cleaner and sharper semantic matching.
Once query correspondences are established, we perform Key–Value rearrangement to align feature memory slots across images. This directly enforces spatial consistency and prevents misaligned texture propagation. The aligned KV pairs are then injected back into the cross-attention layers, refining appearance transfer without distorting structure.
The entire pipeline works without training, masks, or per-image optimization, making it efficient, general, and plug-and-play on any Stable Diffusion backbone.
Attention Visualization
We visualize high-resolution attention maps to analyze attention leakage in prior approaches. Baselines exhibit blurry and inconsistent cross-image attention, incorrectly attending to background or irrelevant regions. Q-Align produces sharp, compact, and semantically consistent attention patterns that clearly correspond to object parts, even under large viewpoint and style differences.