Nodes/ComfyUI-Signed-Image/Preview Signed Image
ComfyUI Node

Preview Signed Image

The preview node for data that lives below zero (and why your detail map looks gray)

By NobutakaKuroki·Created about a month ago·Updated about a month ago· 1
Preview Signed Image
  • signed_image
  • image
modeclamp

You've got a SIGNED_IMAGE - a wavelet coefficient, a filter response, an Image Subtract difference - and it lives in -1..1 with zero as its neutral point. ComfyUI's normal Preview Image can't show you that; it assumes 0..1 and will happily clip everything negative to black. Preview Signed Image is the node that gets you from "values on both sides of zero" to "a picture I can actually look at", and it's the only output node in this pack. If you build a signed branch and never add it, that branch just silently produces nothing you can see.

What it is. It's To Unsigned Image and ComfyUI's built-in preview rolled into one node, so you don't have to glue the conversion to a preview yourself. It takes a signed_image (SIGNED_IMAGE) and a mode dropdown, converts, then saves the result to ComfyUI's temp directory using the same PNG-preview mechanism as the core Preview Image node. The output type is IMAGE and the node is flagged as an output node, so the preview shows in the UI and you can keep wiring the converted image on to Save Image or whatever comes next - the display doesn't eat your data.

The one widget that matters: mode. Default is clamp, and this is where beginners think the node is broken. The three modes:

  • clamp (default) - maps -1..1 to 0..1 linearly, 0 stays mid-gray, and out-of-range values clip. Sign is preserved, which is the honest rendering of your data - and precisely because zero is gray, a subtle detail map renders as an almost-flat gray image. That's correct, but it reads as "nothing happened".
  • abs - magnitude only, 0 → black, ±1 → white, sign discarded. This is the one you want for edge and detail maps: the bright-and-dark sides of an edge both light up, and you suddenly see the high-frequency content.
  • minmax - a per-image contrast stretch: each image's own min → 0, max → 1. This ignores the -1..1 convention entirely, so it lies about absolute values but shows you structure. Great for data with a huge dynamic range, misleading for anything where "how far from zero" means something.

Where people get burned. The clamp default. The pack's own sample workflow - blur, subtract, preview - explicitly uses abs mode, because that's the mode where an unsharp-mask detail map actually looks like an edge map instead of gray soup. If your preview looks flat, flip the dropdown before you blame the node. The flip side of minmax is worth repeating: it stretches every image independently, so two frames with the same underlying values can preview with totally different brightness. If you're comparing frames, clamp or abs keeps the mapping honest.

Under the hood the conversion also scrubs NaN and Inf to zero before it renders, so a filter that blew up won't crash the preview - it'll just show you gray where the values went bad, which is itself a useful debugging hint.

Install. Same as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/NobutakaKuroki/comfyui-signed-image

Restart ComfyUI. No extra Python dependencies - nothing to pip install, no models to download. ComfyUI Manager users: search "comfyui-signed-image".

It writes previews as type: temp, so you won't find them polluting your output folder - they live in ComfyUI's temp directory and get swept away. If you want a keeper, wire the image output into a real Save Image.

CategoryKULab/Convert

Inputs (2)

NameTypeDefaultDescription
signed_imageSIGNED_IMAGE
modeCOMBOclamp3 options: clamp, abs, minmax

Outputs (1)

NameTypeDescription
imageIMAGE