Nodes//Nougan Get Image πŸ–ΌοΈ
ComfyUI Node

Nougan Get Image πŸ–ΌοΈ

Grab any in-workflow image and get IMAGE + MASK, no disk detour

By WinnouganΒ·Created 2 months agoΒ·Updated about a month agoΒ· 4
Nougan Get Image πŸ–ΌοΈ
  • image
  • IMAGE
  • MASK
β—„invert_maskfalseβ–Ί
β—„mask_threshold0.00β–Ί
β—„mask_modeAlpha Channelβ–Ί

ComfyUI's Load Image node is great - until the image you want isn't on disk, it's the output of a node two steps back in your own graph. Normally you'd save it, reload it, and lose a little fidelity (or a lot of time). NouganGetImage grabs an IMAGE that's already flowing through the workflow and hands you both the image and a MASK derived from it, the same shape Load Image gives you - but without touching disk.

It's a small, genuinely handy utility from Winnougan's Nougan_Nodes suite, and the kind of node you only appreciate the second time you'd otherwise be exporting and re-importing a reference.

How it works

You wire any IMAGE in, and it passes the RGB through while building a mask. The mask source is your choice of three modes:

  • Alpha Channel - from RGBA alpha, matching how Load Image builds masks from transparency.
  • Luminance - from pixel brightness (bright pixels become the masked-out region).
  • Blank - all-black mask, meaning "keep everything." Useful when you want the passthrough behavior without any masking.

A mask_threshold binarises the mask above a value (0 = keep it smooth), and invert_mask flips black↔white. It also renders live previews of both image and mask right on the node - preview files are written to ComfyUI's temp folder under a custom nougan_previews key, which deliberately avoids the auto-render path for images so you don't get duplicate previews.

The inputs that matter

  • image - the required wire-in.
  • mask_mode - Alpha Channel / Luminance / Blank. This is the one that decides what your mask actually means.
  • mask_threshold - 0–1, default 0. Crank it up to harden soft edges into a binary mask.
  • invert_mask - swap the mask polarity.

Outputs: IMAGE and MASK, both ready for compositing or inpaint-style nodes. It's marked as an output node, so it can serve as a graph endpoint that shows both previews.

Installing

Search Nougan in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Winnougan/Nougan_Nodes
# restart ComfyUI

No extra dependencies - PIL and numpy are ComfyUI staples, and the pack ships zero pip deps.

Where people get burned

The subtle one: when a mask input is wired in, ComfyUI convention is that the MASK output is a separate thing from the image's own alpha. This node derives the mask from the image, so if you need a mask that isn't a function of the image's alpha or brightness, this isn't the node - use a real mask editor instead. Also, mask_threshold at exactly 0 means "no binarisation," not "binarise at 0," which trips people once. And remember it takes the first frame of a batch like Load Image does. For grabbing references and their masks mid-graph, it's the cleanest way to do it.

Categoryimage

Inputs (4)

NameTypeDefaultDescription
imageIMAGEImage to grab from your workflow.
invert_maskoptBOOLEANfalseInvert the mask (swap black ↔ white).
mask_thresholdoptFLOAT0.000–1Binarise mask above this value. 0 = smooth.
mask_modeoptCOMBOAlpha ChannelAlpha Channel: from RGBA alpha (like Load Image). Luminance: from pixel brightness. Blank: all-black (keep everything).

Outputs (2)

NameTypeDescription
IMAGEIMAGEβ€”
MASKMASKβ€”