Nodes/ComfyUI-TextureAlchemy/Image Bit Depth Checker
ComfyUI Node

Image Bit Depth Checker

What bit depth is your texture really in?

By amtarr·Created 9 months ago·Updated 4 months ago· 58
Image Bit Depth Checker
  • image
  • image
  • bit_depth
  • info
  • memory_mb

Here's a fact that bites every PBR beginner eventually: by the time an image is inside a ComfyUI workflow, it's usually a float32 tensor in memory no matter what kind of PNG you loaded. So when someone tells you "your height map is 8-bit and that's why it bands," they may be wrong - the data in the graph is probably 32-bit float, and the banding happens later, at save time. Image Bit Depth Checker is the node that tells you which is actually true instead of making you guess.

It's a diagnostic utility in TextureAlchemy's Texture Alchemist/Analysis category, marked as an output node, which in ComfyUI means it's built to sit at the end of a graph and show you results rather than feed anything onward.

How it works

The node reads the actual tensor properties - dtype, shape, element size - and maps the dtype to a human-readable bit depth via a lookup table that covers float16, float32, float64, bfloat16, uint8, int8/16/32/64. So a standard ComfyUI image reports as "32-bit float (single precision)" and 32 as its bit depth. It also computes memory usage in MB from the element size times pixel count, and scans the min/max value range so you can see whether your data actually spans 0–1 or is clipped somewhere.

On top of the wired outputs it prints a console report with the same numbers, which is handy because the console often survives where a string output doesn't. This is genuinely the fastest way to answer "why does my EXR look banded?" - check what precision you're actually working in before you blame the file format.

The outputs

  • image - a passthrough of your input, so you can drop this node in mid-graph without breaking the flow.
  • bit_depth - STRING, the dtype-derived depth ("16-bit float (half precision)", etc.).
  • info - STRING with the fuller analysis (shape, value range, memory).
  • memory_mb - INT, how many MB this tensor is occupying on the GPU/CPU.

Input is just image. That's the whole API - a probe, not a processor.

Where it fits

Reach for it when you're chasing banding in height or roughness maps, when you're about to save EXR and want to confirm you're not about to lose precision, or when someone hands you a workflow and you want to know what precision it's actually operating at. It's also quietly useful for VRAM budgeting - that memory_mb number tells you whether a 4K texture set is about to eat your card.

Installing it

Ships with ComfyUI-TextureAlchemy. ComfyUI Manager → search "TextureAlchemy" → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/amtarr/ComfyUI-TextureAlchemy

Restart, find it under Texture Alchemist → Analysis. No extra dependencies - pure torch introspection.

Common issues

  • "It says 32-bit float but I loaded an 8-bit PNG." That's not a bug, that's the whole point of the node. ComfyUI converts to float on load; the bit depth it reports is in-memory, not on disk. The 8-bit-ness only returns when you save back to PNG.
  • "The bit_depth output looks like a string, not a number." Correct - it's the human-readable label ("16-bit float"), which is what you'll actually want when checking a report. Use it with a string-display node.
  • Nothing shows on screen. It's an output node; if you don't see results, make sure it's the last thing in the chain or hooked to a preview widget that can render strings.

It's a small node, but in the "my textures look wrong and I don't know why" category, this one answers the question in one run.

CategoryTexture Alchemist/Analysis

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (4)

NameTypeDescription
imageIMAGE
bit_depthSTRING
infoSTRING
memory_mbINT