Nodes/ComfyUI TK3R Extensions/TK3R Safetensors Precision Reader
ComfyUI Node

TK3R Safetensors Precision Reader

So, is that checkpoint actually fp8?

By TK3R·Created 7 months ago·Updated 7 months ago· 2
TK3R Safetensors Precision Reader
    • PRECISION_INFO
    file_path

    Every model download page offers you the same menu these days: fp16, bf16, fp8, maybe a GGUF, maybe NVFP4. The file names look trustworthy until the day they don't, and once a model is loaded into ComfyUI it's not obvious what precision you actually got. TK3R Safetensors Precision Reader settles it: give it a path to a safetensors file and it tells you the floating-point precision - fp32, fp16, bf16, fp8 (e4m3 or e5m2), int8 - plus a full per-dtype breakdown of how many tensors use each.

    Why bother? Because precision is a real decision, not a checkbox. fp8 is half the VRAM of fp16 with near-invisible quality loss, and bf16 vs fp16 matters on some hardware. If a workflow ran fine in a tutorial and OOMs on your machine, one of the first questions is "did I actually grab the fp8 build?" This node answers it in a second.

    How it works

    It opens the file with safetensors.torch.safe_open, iterates every tensor, records each one's dtype, and tallies the counts. It then reports the most common dtype as the primary precision and lists the full breakdown with percentages. The whole scan reads headers and tensor metadata without loading weights into VRAM, so even a 12 GB checkpoint is checked almost instantly.

    The one subtlety is the input: give it the full path to the file, or a path relative to your ComfyUI/models folder (it resolves relative paths by going up from the checkpoints directory). If you pass a filename that isn't where it expects, you'll get an error string back rather than a crash.

    Input and output

    • file_path - STRING, full path or models-relative path to a .safetensors file.
    • PRECISION_INFO - STRING, output-node style: file name, primary precision, total tensor count, and the per-precision breakdown.

    Installing

    Part of the TK3R Extensions pack:

    • ComfyUI Manager → search "TK3R Extensions" → Install, then restart.
    • Or cd ComfyUI/custom_nodes && git clone https://github.com/TK3R/ComfyUI_TK3R_Ext and restart.

    No extra dependencies - safetensors ships with ComfyUI.

    Where it actually helps

    The typical use is verification before you commit: you downloaded "fp8" and you want to confirm before you rebuild your workflow's memory budget around it. It also catches a classic gotcha - files that are mixed precision, where the main model is fp8 but some tensors are fp16 or bf16. The breakdown output is the part that reveals that; the primary-precision line alone would hide it. It won't tell you anything about GGUF or NVFP4 files (those aren't plain safetensors), so don't point it at those and expect a useful answer.

    CategoryTK3R/Utility

    Inputs (1)

    NameTypeDefaultDescription
    file_pathSTRINGFull path to safetensors file

    Outputs (1)

    NameTypeDescription
    PRECISION_INFOSTRING