Nodes/Gimbal-ComfyUI/πŸ“Š Gimbal Latent Diagnostics
ComfyUI Node

πŸ“Š Gimbal Latent Diagnostics

Peek inside a latent without changing a thing

By FormAndNoiseΒ·Created about a month agoΒ·Updated 19 days agoΒ· 0
πŸ“Š Gimbal Latent Diagnostics
  • 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 or min_val < βˆ’8 - values are deep in the tails, where the VAE decoder produces black outlines and plastic textures. The fix is a GimbalTruncation or GimbalLatentStabilizer pass, or simply less aggressive steering.
  • std_dev way 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.

CategoryGimbal/Telemetry

Inputs (1)

NameTypeDefaultDescription
latentLATENTβ€”

Outputs (10)

NameTypeDescription
meanFLOATβ€”
std_devFLOATβ€”
min_valFLOATβ€”
max_valFLOATβ€”
l2_normFLOATβ€”
batch_sizeINTβ€”
channelsINTβ€”
heightINTβ€”
widthINTβ€”
flight_reportSTRINGβ€”