Z-SASLM: Zero-Shot Style Blending via Spherical Interpolation
Published:

The Problem: Linear Blending in a Non-Linear Space
Latent diffusion models (like Stable Diffusion) encode styles as vectors in a high-dimensional latent space. When you want a generated image that combines two or more reference styles, the intuitive approach is to take a weighted average: blend = α·style₁ + β·style₂ + …
This is linear interpolation (LERP), and it has a fundamental flaw: it assumes the latent space is Euclidean — that style representations live on a flat plane and midpoints are simply averages. But latent spaces of diffusion models are curved; style representations live on (or near) a hypersphere.
Linear blending of unit vectors produces a result that is shorter than the originals — it falls inside the sphere, into a low-density region of the latent space. The result: blended styles lose structure, introduce artifacts, and fail to faithfully combine the reference styles.
Why This Is a Real Failure Mode
When style blending fails, the output usually does not fail in an obvious binary way. Instead, one reference style dominates, another becomes washed out, or the image acquires unstable artifacts in the regions where the styles should interact. That is why the geometry matters: even if the prompt and the base diffusion model are unchanged, the interpolation rule alone can move generation into a part of latent space where the model has much weaker semantic support.
Z-SASLM: Geodesic Blending
Z-SASLM replaces LERP with Spherical Linear Interpolation (SLERP), which interpolates along the great circle (geodesic) of the hypersphere. For two unit vectors u and v:
\[\text{SLERP}(\mathbf{u}, \mathbf{v}; t) = \frac{\sin((1-t)\Omega)}{\sin\Omega}\,\mathbf{u} + \frac{\sin(t\Omega)}{\sin\Omega}\,\mathbf{v}\]where Ω is the angle between u and v. The result stays on the sphere, preserving the norm and intrinsic geometry of the latent space.
Step-by-step: SLERP for two style vectors at t = 0.5
Suppose style₁ and style₂ are unit vectors with angle Ω = 60° between them.
| Quantity | Value |
|---|---|
| Ω | 60° = π/3 rad |
| sin(Ω) | sin(60°) = 0.866 |
| sin((1−t)Ω) = sin(0.5 × 60°) | sin(30°) = 0.500 |
| sin(tΩ) = sin(0.5 × 60°) | sin(30°) = 0.500 |
| Weight for u | 0.500 / 0.866 = 0.577 |
| Weight for v | 0.500 / 0.866 = 0.577 |
| LERP weights at t=0.5 | 0.500 / 0.500 (flat) |
Both SLERP weights are 0.577, and the result vector has norm ≈ 1 (stays on the sphere). LERP would give weights 0.5/0.5 but the resulting vector has norm cos(30°) ≈ 0.866 — 13% shorter than it should be, pushed inside the sphere.
For multiple styles, Z-SASLM extends SLERP iteratively: blend style₁ and style₂ to get an intermediate representation, then blend that with style₃, and so on. Weights are applied at each step to control the contribution of each style.

Full Pipeline

The pipeline leverages StyleAligned attention sharing for style injection: at generation time, the blended style vector influences the self-attention maps of the UNet decoder, imprinting the fused style onto the generated image without retraining.
What Actually Makes Z-SASLM Practical
The method is not just “use SLERP instead of LERP.” The practical contribution is the combination of:
- a zero-shot pipeline, so no style-specific fine-tuning is needed;
- multi-reference blending, not only two-style interpolation;
- context-aware weighting, so different reference modalities can contribute differently;
- an evaluation protocol that checks whether all styles remain visible in the result.
That combination makes the method usable as an actual generation workflow rather than a one-off interpolation demo.
Results
2-Style Blending

SLERP vs. Linear: 3-Style Comparison

New Evaluation Metric: WMS-DINO
Standard style-transfer metrics (CLIP score, DINO similarity) evaluate similarity to a single reference style. For multi-style blending, you need to measure consistency with all styles simultaneously.
Z-SASLM introduces Weighted Multi-Style DINO VIT-B/8 (WMS-DINO): a weighted average of pairwise DINO similarities between the generated image and each style reference, using the same weights as the blend. This metric quantitatively captures whether all input styles are faithfully represented in the output.
Worked example — WMS-DINO calculation for 3 styles:
Blend weights: w₁=0.4, w₂=0.35, w₃=0.25. DINO similarities of the generated image to each reference:
| DINO sim to Style₁ | DINO sim to Style₂ | DINO sim to Style₃ | WMS-DINO | |
|---|---|---|---|---|
| LERP result | 0.72 | 0.45 | 0.31 | 0.4×0.72 + 0.35×0.45 + 0.25×0.31 = 0.523 |
| SLERP result | 0.68 | 0.63 | 0.58 | 0.4×0.68 + 0.35×0.63 + 0.25×0.58 = 0.639 |
The LERP result scores higher on Style₁ alone (0.72 vs 0.68) — it dominated. But the balanced WMS-DINO score is lower because Styles 2 and 3 were suppressed. The SLERP result trades a fraction of Style₁ fidelity for substantially better balance across all three.
The Core Takeaway
Z-SASLM is a paper about respecting representation geometry. If the latent space behaves like a curved manifold, then interpolation should follow that geometry. Once that is enforced, the rest of the style-alignment pipeline becomes noticeably more stable.
✅ Key Takeaways
- Linear blending of latent style vectors is geometrically incorrect — the latent space is curved, not flat.
- Z-SASLM replaces LERP with iterative SLERP along the geodesic of the hypersphere, preserving latent manifold structure.
- Zero-shot and fine-tuning-free: works with any pre-trained latent diffusion model via StyleAligned attention injection.
- Introduces WMS-DINO, a new evaluation metric for multi-style consistency.
- Published at CVPR 2025 Workshop on Computer Vision for Extended Universe (CVEU).
