Nodes/WtlNodes/RAM Preview Mask
ComfyUI Node

RAM Preview Mask

Look at a mask without writing a single file to disk

By Scorpiosis0·Created 10 months ago·Updated 2 months ago· 3
RAM Preview Mask
  • mask

    RAMPreviewMask is the node you tack onto the end of any mask pipeline when you just want to look at what you built. You feed in a MASK, and it shows that mask in the node's preview panel - grayscale, RAM-only, never written to disk. Outputs: none. It's a pure inspection node, and it's the sort of thing every mask-heavy workflow quietly needs and nobody builds until they've lost 40 minutes to "where did my mask go."

    The mechanism is about as simple as it gets: the mask tensor gets expanded from single-channel to RGB so the preview renderer will display it, then shipped to the frontend over ComfyUI's websocket via the pack's RAM-preview helper. Nothing touches the output/ directory. If you're working through a long chain of mask transforms - filter, dilate, feather, rotate, zoom - dropping one of these at each stage lets you see every intermediate state, which is the entire debug loop for mask work.

    Why does RAM-only matter? Two reasons. One: your output folder stays clean - no flood of mask_00001_.png files you'll have to purge. Two: it's fast. Disk I/O on every intermediate mask is wasted work; previewing in RAM means the only cost is rendering to the browser. The pack's other preview nodes (RAM Preview Image, RAM Image Compare) follow the same philosophy - inspect without committing.

    The one thing to remember: because it never writes to disk, the preview lives only in the running session. If you actually need the mask saved as an image file for reuse later, this node won't do it - pair it with a normal mask-save node for that. It's a display, not a recorder.

    It ships in the WtlNodes pack (Scorpiosis0/ComfyUI-WtlNodes). Install via ComfyUI Manager by searching "WtlNodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Scorpiosis0/ComfyUI-WtlNodes.git
    

    then restart ComfyUI. Dependencies are numpy, scipy, and pillow - no model files, no keys, nothing heavy.

    That's the whole node, and that's fine. When you're three mask operations deep and something looks wrong, the fix for "I can't tell what my mask is doing" is a preview node, and this is a good one.

    CategoryWtlNodes/mask

    Inputs (1)

    NameTypeDefaultDescription
    maskMASK

    Outputs (0)

    No outputs