Nodes/Gimbal-ComfyUI/πŸ› οΈ Gimbal Latent Stabilizer (LAMNr)
ComfyUI Node

πŸ› οΈ Gimbal Latent Stabilizer (LAMNr)

Latent Stabilizer kills deep-fried artifacts

By FormAndNoiseΒ·Created about a month agoΒ·Updated 19 days agoΒ· 0
πŸ› οΈ Gimbal Latent Stabilizer (LAMNr)
  • latent
  • stabilized_latent
  • stabilizer_telemetry
β—„truncation_psi0.90β–Ί
β—„subspace_rank-1β–Ί
β—„scale_cap10.0β–Ί
β—„jitter_strength0.000β–Ί
β—„residual_variance0.00β–Ί

If you install this pack and keep exactly one node, it should probably be this one. GimbalLatentStabilizer is the pack's quality cleanup pass: it takes a latent that's been shoved out of the healthy range - by aggressive steering, high CFG, or just a bad day - and pulls it back toward the region where the model actually produces clean images. The pack's own docs call it "automatic flight stabilizer," and for once the aviation metaphor earns its keep.

How it works

It runs a four-stage pipeline on your latent:

  1. Bounded coupling scale (scale_cap) - applies a tanh cap to the scale map so no channel is driven past a sane magnitude. Large scale_cap β‰ˆ identity; small caps actively attenuate.
  2. Dequantization jitter (jitter_strength) - adds a tiny uniform noise (off by default at 0) meant to break up the banding you get from quantized inputs. Leave it off unless you're chasing posterization.
  3. Truncation toward centroid (truncation_psi) - the z' = ΞΌ + ψ(z βˆ’ ΞΌ) shrink toward the channel mean. Below 1.0 it reins in outlier spikes; above 1.0 it exaggerates variance. This is the stage that fixes "deep fried."
  4. Woodbury low-rank denoise - fits a low-rank SVD subspace (subspace_rank) and shrinks the residual variance toward the conditional mean using the Woodbury identity. This is the genuinely clever bit: instead of a blunt global blur, it denoises along the directions of the latent's own dominant structure and leaves the meaningful signal alone.

Inputs are latent, truncation_psi (default 0.9), subspace_rank (default βˆ’1 = keep all SVD components), scale_cap (default 10), and optional jitter_strength and residual_variance. Outputs are stabilized_latent and stabilizer_telemetry.

How to set it

The README's sweet spot, after steering, is ψ = 0.88 and scale_cap = 8.0. The tooltip's guidance is the thing to memorize: ψ = 1.0 is identity, ψ < 1.0 is the cleanup direction, ψ > 1.0 exaggerates. Start at 0.88–0.92 and only push lower if you still see ringing or black outlines. subspace_rank can stay at βˆ’1 for most people; dropping it to something like 16–32 speeds things up on big batches at a small quality cost.

Installing

Standard pack install: ComfyUI Manager β†’ search "Gimbal-comfy" β†’ install β†’ restart, or git clone https://github.com/FormAndNoise/Gimbal-comfy into ComfyUI/custom_nodes. Dependencies are torch/numpy/pillow, already present; nothing downloads. The README's clone URL is stale - FormAndNoise/Gimbal-comfy is live.

Where people get burned

Over-stabilizing is the real failure mode. ψ below ~0.7 turns everything into a smoothed, plastic version of itself - the artifact remover becomes the artifact. And jitter (jitter_strength > 0) is easy to misread as "extra detail" when it's really "dithering noise," so keep it at 0 unless you know you're fighting banding. One expectation-setter: the README pitches this as the fix for CFG-driven "deep frying," and it genuinely helps there - but on 2026 guidance-distilled models (FLUX, Klein, the flow-matching crowd) the real fix is CFG β‰ˆ 1 in the first place, not a latent cleanup. Stabilizer is a salve for SDXL-era workflows; it can't manufacture quality that was never in the latent.

CategoryGimbal/Stabilizer

Inputs (6)

NameTypeDefaultDescription
latentLATENTβ€”
truncation_psiFLOAT0.900–31.0 = identity; <1.0 = pull outliers toward the channel-mean centroid (cleaner); >1.0 = exaggerate variance
subspace_rankINT-1-1–64Woodbury low-rank subspace size; -1 = keep all available SVD components, 0 = Frechet-mean template only
scale_capFLOAT10.00.1–1000Bounded coupling-scale magnitude cap (tanh scale_map). Large -> near identity; small -> strong attenuation
jitter_strengthoptFLOAT0.0000–1Uniform dequantization jitter peak amplitude; 0 disables this stage
residual_varianceoptFLOAT0.000–100Residual isotropic variance sigma^2 for the Woodbury conditional mean; 0 = estimate from the SVD trailing eigenvalues

Outputs (2)

NameTypeDescription
stabilized_latentLATENTβ€”
stabilizer_telemetryDICTβ€”