π Gimbal Latent Diagnostics
Peek inside a latent without changing a thing
- latent
- mean
- std_dev
- min_val
- max_val
- l2_norm
- batch_size
- channels
- height
- width
- flight_report
Every toolset needs a way to see what it's actually doing, and GimbalDiagnostics is that for the Gimbal pack: a read-only instrument that reports the statistics of a latent tensor - mean, standard deviation, min, max, L2 norm, shape - and nothing more. It doesn't rewrite, denoise, or steer anything. You attach it to a wire, run the graph, and read the numbers.
What you get
Input: latent. Outputs, all readouts: mean, std_dev, min_val, max_val, l2_norm, batch_size, channels, height, width, and flight_report (a human-readable summary string). Note what's not here: no modified latent comes out. The node is a terminal - it reports, it doesn't pass through - so it sits at the end of a monitoring branch, not in the middle of your render chain.
What the numbers mean
The pack's own guide gives you a healthy-SDXL baseline to compare against: before sampling, a sane latent is roughly centered (mean β 0), near-unit variance (std β 0.9β1.2), and max values under about 4.0 (within ~4Ο). The two warning signs worth remembering:
max_val> 8 ormin_val< β8 - values are deep in the tails, where the VAE decoder produces black outlines and plastic textures. The fix is aGimbalTruncationorGimbalLatentStabilizerpass, or simply less aggressive steering.std_devway above ~3 - variance explosion, usually from high CFG or strength settings pushed too far. Drop the guidance or stabilize.
l2_norm is the one that takes a second to get used to: in this space the norm of a healthy latent scales with the square root of the dimension count (roughly β65536 Γ Ο β 256 for SDXL at unit variance), so it's a sanity check on whether you're in the right ballpark, not a number to tune to.
When you'd reach for it
When something looks wrong and you want data instead of vibes. Put it after a Compass Pro steering move and compare std against your baseline - if it's doubled, your strength is too high. Put it before the final sampler after a stabilizer and confirm the values came back into range. It's also a fine teaching tool: split a latent with GimbalChannelSplit and run each band through here to see which channel range is carrying the energy.
Installing and gotchas
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 bundled; nothing downloads. (The README's clone URL is stale - FormAndNoise/Gimbal-comfy is live.)
The one thing that trips people: because there's no latent output, you can't just drop it inline and expect your workflow to keep flowing - you have to branch a copy of the latent wire into it. And the "healthy baseline" numbers are SDXL-era guidance; on FLUX's 16-channel latents the norms sit at a different scale entirely. Compare against your own reference renders rather than chasing the doc's exact figures. It's a simple, honest utility, and in a pack this young - near-zero community discussion, heavily AI-assisted code - a little visibility into the tensor is worth having.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | β |
Outputs (10)
| Name | Type | Description |
|---|---|---|
| mean | FLOAT | β |
| std_dev | FLOAT | β |
| min_val | FLOAT | β |
| max_val | FLOAT | β |
| l2_norm | FLOAT | β |
| batch_size | INT | β |
| channels | INT | β |
| height | INT | β |
| width | INT | β |
| flight_report | STRING | β |