SHANNON ENTROPY (JOV_MEASURE)
Is that image actually blank? Let Shannon entropy tell you
- image
- FLOAT
Honestly, most people don't need this node. But if you've ever run a batch of generations and gotten back one flat gray rectangle, a solid black image, or a latent that collapsed into nothing - you need a way to catch that automatically. SHANNON ENTROPY (JOV_MEASURE) is a one-input, one-output node that turns "how much is actually going on in this image" into a number. It's from Jovi_Measure, the small metrics pack by Alexander Morano (Joviex), the author of the big Jovimetrix toolbox. Same family, same install, different job: pure measurement, no models, no keys.
What the number means
Entropy, in the Shannon sense, is a measure of information content - how unpredictable a signal is. In image terms: it looks at how your pixel values are distributed and computes the classic -Σ p·log₂(p) over that histogram. A flat gray image has essentially one value repeated everywhere, so its entropy is near zero. A busy, textured image spreads values across the whole range, so it scores higher. That's the whole intuition: flat = low, busy = high.
The specific trick entropy catches that a blur detector can't: a grainy, noisy image can be "sharp" while still being garbage, and a blank output is flat. So entropy is your "did the model actually draw anything" detector. Latent collapse, a black canvas, an all-white frame - they all collapse toward zero. A high-entropy image at least has content, even if it's noise.
Why you'd reach for it
The clean use case is a quality gate, and it pairs beautifully with the pack's other node, BLUR EFFECT (JOV_MEASURE). Blur tells you how mushy something is; entropy tells you how much is happening. Taken together you get four buckets: sharp + high = detailed, sharp + low = flat and empty, blurry + high = noisy mush, blurry + low = basically blank. Wire both FLOATs into a comparison or threshold node and your workflow can silently re-roll the failures instead of you discovering them at the end. You can also use it as a rough "does this prompt/CFG/LoRA weight produce more going on" probe - just remember noise inflates entropy, so higher isn't automatically better.
Inputs and outputs
There are no knobs here. The schema is exactly:
- image (required) - RGBA, RGB, or grayscale.
- Output: a FLOAT, the Shannon entropy of the image.
One per image in the batch, and - same as its sibling - the output arrives as a list (the v1.1.0 update made every Jovi_Measure output a list). One image in, single-element list out. If your downstream node chokes on a list, unwrap it first. There's genuinely nothing else to configure; it's about as frictionless as a measurement node gets.
How to install it
Identical to the rest of the pack. Via ComfyUI Manager, search "Jovi Measure" and install. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Amorano/Jovi_Measure
cd Jovi_Measure
pip install -r requirements.txt # on Windows: .\python_embed\python.exe -s -m pip install -r requirements.txt
Restart ComfyUI and it shows up under JOVI_MEASURE 📐. No model files to fetch - it's numpy and scikit-image doing the math, so the only real dependency traps are the ones baked into the pack itself: scikit-image is a heavy pull (it brings scipy along), and the requirements pin numpy < 2. If another pack upgraded numpy to 2.x, the import fails. pip show numpy is the first thing to check when this pack (or the cozy_comfyui core it's built on) breaks after an update. That core installs from git main and moves under you, which is a normal quirk of the author's packs rather than a bug in your setup.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | RGBA, RGB or Grayscale image |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | The Shannon entropy value of the image. |