π― YFG Monochrome Image Clip
Six threshold modes, three channels β the swiss-army monochrome clipper
- image
- IMAGE
Sometimes you don't want a soft grayscale - you want clipped grayscale: everything above a threshold forced one way, everything below forced another, or slammed to zero. That's what Mono Clip does, and because it offers six threshold modes it covers a surprising amount of ground: hard black-and-white masks, silhouette extractions, thresholded alpha channels, and stylized high-contrast art.
It's the "Monochrome Image Clip" node from the YFG Comical pack (gonzalu/ComfyUI_YFG_Comical), based on code originally by XSS. One IMAGE in, one IMAGE out - no mask output, so if you need an actual MASK tensor you'd feed the result to an image-to-mask converter.
The modes
The mode dropdown is where the power lives. All six compare each pixel against threshold:
- binary - above threshold β white, else black. Your classic hard threshold.
- inverse binary - the negative of that.
- to zero - above threshold keeps its value, below β black.
- inverse to zero - below threshold keeps its value, above β black.
- truncate - above threshold clamps to the threshold value, below keeps its value.
- inverse truncate - below clamps to the threshold, above keeps its value.
The README's "each reversible" point is the useful one: binary and inverse binary are opposites, and the truncate modes give you soft, low-key versions. For a mask you'd want binary; for a stylized treatment, to zero or truncate keeps some tonality.
channel picks which channel feeds the threshold: red, green, blue, or greyscale (luminance). If you're thresholding a subject that pops on the red channel but not on luminance, that choice can be the difference between a clean silhouette and noise. Default threshold is 0, so raise it - on a normal image a threshold of 0 with binary mode gives you an almost-all-white output.
Output
A single IMAGE output, same dimensions as the input. Wire it into a SaveImage for stylized output, or into an image-to-mask node when you need a hard mask downstream.
Installing
Part of the pack: ComfyUI Manager β search "YFG Comical", or
cd ComfyUI/custom_nodes
git clone https://github.com/gonzalu/ComfyUI_YFG_Comical
Restart ComfyUI. Same pack-wide caveat as the rest - the pack imports cv2/matplotlib in some files without listing them in pyproject.toml; if the pack won't load, pip install opencv-python matplotlib and restart.
Practical take
This node is the right tool when a plain ImageThreshold feels too blunt and drawing a mask feels too slow. The multi-channel input is the sleeper feature - thresholding a specific color channel often beats luminance for separating a subject from a background. For genuinely soft masks, though, the pack's Image To Contrast Mask (with its blur) is the better call; Mono Clip is a scalpel, not a paintbrush.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | β | |
| channel | COMBO | greyscale | 4 options: red, green, blue, greyscale |
| threshold | INT | 00β255 | β |
| mode | COMBO | binary | 6 options: binary, inverse binary, to zero, inverse to zero, truncate, inverse truncate |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |