TIDE SDXL High-Resolution Extrapolation
SDXL at 1536 gets doubled heads — attention temperature helps, anchoring wouldn't
- model
- MODEL
SDXL's native home is 1024x1024. Push it to 1536 or 1792 and the classic signs show up: doubled heads, elongated bodies, repeated patterns - the off-resolution artifacts every architecture has. The usual fix is to generate small and upscale, which works but leaves you hostage to whatever your upscaler can invent. TIDE SDXL High-Resolution Extrapolation takes a different route: it patches the model's attention so high-res generation behaves better at the source, without a hires pass.
This is the SDXL sibling of the TIDE nodes in the same pack (Flux and WAN get their own). But read the fine print before you get excited, because this one is honest about being a partial implementation. It applies only the Dynamic Temperature Control half of the TIDE paper - step-aware attention sharpening that's stronger early in denoising and relaxes as detail takes over. It deliberately skips Text Anchoring, and the reason is geometry, not laziness. In SDXL's UNet cross-attention, the keys are text-only, so adding the same positive bias to every text key gets cancelled by softmax shift invariance - it mathematically cannot change the output. Self-attention has no text keys at all. So there's nothing to anchor, and the author ships the part that actually works: scaling attention temperature when the model is extrapolating.
How it works
The node clones your MODEL and installs an optimized_attention_override, so it doesn't touch the checkpoint or fork ComfyUI core. The override detects SDXL SpatialTransformer attention (via activations_shape), skips Flux-style sites, classifies each attention call as self or cross by comparing query and key token counts, and scales queries by inv_tau before the attention function:
logits = (Q * inv_tau) K^T / sqrt(d)
The minimum temperature is derived YaRN-style from your extrapolation ratio: sqrt(1/tau_min) = 0.1 * ln(scale) + 1, where scale = sqrt((width × height) / (base_width × base_height)). If another attention override already exists, it chains to it after applying its own scaling. Same trick as its siblings: no sampler change, no extra steps, no added sampling cost beyond the patch itself.
Inputs
Everything on this node is a required input - there's no optional section, which is mildly unusual but fine:
model- an SDXLMODEL.width/height- final generated dimensions (defaults1536x1536). Must match your actual latent size.temperature_strength-0.0disables the patch. Note this one caps at1.0, unlike the Flux/WAN nodes where you can push to 4; you're blending from no-op to full, not boosting beyond it.base_width/base_height- the native reference, 1024 by default. Correct for SDXL.alpha- the single exponent on the temperature curve (default0.6).tau_max- max temperature near the end of denoising (default1.0).apply_to-cross,self, orboth(defaultboth). This is the knob to reach for first if results look unstable.
Output is a patched MODEL that wires straight into your sampler: loader → this node → sampler.
Installing it
Same pack, same one-liner. ComfyUI Manager search for "TIDE", or:
cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-TIDE
Restart ComfyUI. requirements.txt is just torch, so there's nothing extra to fetch - no weights, no model files, no downloads.
Where people get burned
Start with apply_to=both, and if the output gets unstable, the README's advice is to test cross and self separately to find which attention path is misbehaving for your checkpoint. Remember this is the least faithful of the three TIDE nodes - it's explicitly an experimental temperature adaptation, not full TIDE, and the author says as much. At or below native resolution it's effectively a no-op, so don't judge it at 1024. And set width/height to match reality, or the temperature curve is computed for the wrong extrapolation ratio. It's brand-new and barely tested in the wild, so treat it like a promising experiment: A/B it against your normal SDXL workflow at your target resolution, and keep the ablation settings handy if a specific checkpoint reacts badly.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| width | INT | 153664–16384 | — |
| height | INT | 153664–16384 | — |
| temperature_strength | FLOAT | 1.000–1 | — |
| base_width | INT | 102464–16384 | — |
| base_height | INT | 102464–16384 | — |
| alpha | FLOAT | 0.600.01–4 | — |
| tau_max | FLOAT | 1.000.05–4 | — |
| apply_to | COMBO | both | 3 options: cross, self, both |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |