StyleID++: training-free stylization secretly follows coordinates; fixing it yields best ArtFID

StyleID++: Position-Decoupled and Structure-Coherent Style Retrieval across Diffusion Architectures

Chun Xie, Itaru Kitahara

cs.CV

2026-11-25

StyleID++ shows attention injection matches style tokens by coordinates, not appearance, and fixes the leak training-free, reaching the best ArtFID on both SDXL and FLUX.

What problem this solves

One family of training-free style transfer works by attention injection: keep the content image's queries and swap self-attention keys and values with features recorded from a style image, so in principle every content token can retrieve evidence from anywhere in the reference. A one-line experiment breaks that assumption: swap the top and bottom halves of the style image before injection, and the colored regions in the output move with the relocated texture even though the content image is unchanged. Retrieval depends on where style evidence sits, not just what it looks like. The behavior appears in both a convolutional U-Net (SDXL) and a diffusion transformer (FLUX), whose position mechanisms share nothing. The failure is not any particular position operator; it is carrying a within-image position prior into retrieval between two images whose layouts are unrelated. The paper calls this cross-image positional leakage.

Method

StyleID++ has two training-free components, one per layer of the problem.

Position-Decoupled Retrieval (PDR) targets each backbone's position source. In U-Nets, repeated zero padding makes each feature's distance to the image boundary recoverable, an implicit absolute coordinate. PDR replaces zero padding with circular padding in the VAE and denoising U-Net during both inversion and sampling, which makes the style branch exactly shift-equivariant. Reflection and replication padding, tested as controls, only drop the permutation error from 0.5059 to about 0.13, which pins the leak on the constant boundary value. In DiTs the leak is explicit: RoPE modulates query-key similarity by relative coordinates. PDR drops RoPE only when computing the injected content-query/style-key logits and keeps it on every native path, because removing it globally zeroes the leak but degrades style alignment (FID 16.631 to 18.533).

Affinity-Coherent Refinement (ACR) handles the problem PDR exposes. Once queries can retrieve globally, each token decides nearly independently, and related content tokens can pick incompatible style regions, showing up as mottled colors and broken strokes. ACR builds an annotation-free affinity graph from content self-attention recorded before injection. For each query, the candidate set unions its own top-κs style keys with the dominant key of each of its top-κq content neighbors; two additive biases scaled by the row's logit standard deviation (λself protects the query's own ranking, λaff rewards neighbor-supported keys) reshape the logits, followed by a masked softmax over the candidate set. This is one sparse message-passing step in style-retrieval space: related tokens are pushed toward compatible evidence, not forced to copy one assignment.

Results

All 2,060 content-style pairs (20 MS-COCO × 103 WikiArt); SDXL with DDIM 20 steps, FLUX with Euler 14 steps, one H100.

Leakage under the injection baseline: coordinate-centroid correlation 0.7987 (SDXL) and 0.7727 (FLUX); permutation error 0.5059 and 0.5665. After PDR, SDXL reaches 0.0000 PEE and 0.0001 LPIPSswap; FLUX drops to 0.0748 and 0.0018.

ArtFID is lower-is-better and penalizes both content drift (LPIPS) and style mismatch (FID):

MethodArtFID↓FID↓LPIPS↓
StyleID (SDXL)23.17214.4000.5049
StyleSSP22.06013.8540.4851
StyleGallery21.49514.1100.4226
StyleID++ (SDXL)20.89413.1970.4717
USO (FLUX, trained)29.45319.0000.4727
StyleID++ (FLUX)26.28018.0470.3797

Ablations: on SDXL, PDR and ACR each improve ArtFID and combine best (22.489 to 20.894). On FLUX, PDR drives the content-preservation gain (LPIPS 0.7705 to 0.4540) and ACR pushes it to 0.3797 at a small FID cost (17.813 to 18.047). A 20-person user study over 30 pairs rates StyleID++ highest on all three dimensions (content 4.08, style 4.15, overall 4.08) over StyleID (3.34/3.85/3.65) and StyleSSP (3.74/3.58/3.70), p<0.01.

Why it matters

If you build on attention-injection stylization, both components are drop-in: no training, no labels, no auxiliary model, and they help on both backbones. The diagnosis travels further than the fix. Any method that reuses within-image attention between two independently composed images can inherit the same positional shortcut, and the permutation test is just a rerun with a rearranged style reference, cheap to replicate on any pipeline.

Limitations

Terms

Source

What people are saying

Related papers

All paper explainers