Nodes/CMK Flow/CMK Pipe Peek ControlNet Source
ComfyUI Node

CMK Pipe Peek ControlNet Source

CMK Pipe Peek ControlNet Source

By CMKFlow·Created 3 months ago·Updated a day ago· 6
CMK Pipe Peek ControlNet Source
  • pipe
  • base_image
  • mask

This is the thinnest node in the pack, and that's fine. It takes a CMK_PIPE and gives you back two things: the image and the mask.

return (pipe.get("image"), pipe.get("mask"))

That's the whole implementation. Two outputs, base_image (IMAGE) and mask (MASK), both read straight off the pipe with no transformation, no fallback chain, no validation.

So why does it exist

ControlNet prep nodes in ComfyUI want an image to preprocess. If you're working inside a CMK flow, that image is sitting in a pipe rather than on a wire - so you need something that taps it. That's all this is: the tap.

The name is the giveaway about the intended use. In the CMK reference flow there's an optional module 05 ControlNet, and the natural thing to feed a ControlNet preprocessor is the source image at that point - the base canvas, before any sampling has happened. base_image gives you exactly that, and mask gives you the inpaint mask alongside it, which is what you want if you're running ControlNet on an inpainting job where the ControlNet should also respect the masked region.

The companion peek on the preprocess side is worth knowing about: CMK Pipe Peek Preprocess Detailer and CMK Pipe Peek Preprocess Face do the same job for the detailer and face-process inputs, unpacking image, model, clip, vae plus optional seed and prompt strings. Same idea, more wires.

What the outputs are good for

base_image → any preprocessor you like: Canny, Depth, OpenPose, MLSD, whatever someone's pack offers. CMK doesn't force you into its own ControlNet stack; the README says the pack's offered ControlNet preprocessors need no foreign custom-node packages, but nothing stops you from using someone else's.

mask → mask-aware nodes. A MASK is a tensor, so it plugs into InvertMask, GrowMask, MaskComposite, or the mask input of an inpaint sampler.

A realistic wiring: pipe → Peek ControlNet Source → DepthAnything-ish preprocessor → your ControlNet Apply → the sampled latent. That's a bespoke ControlNet path sharing the same image the CMK flow is using, which is the main reason to bother.

It's also a decent escape hatch if you're on a base CMK's own ControlNet modules don't cover. ControlNet supply stopped being the problem a while ago - a union model now lands within about a week of each new base - but what you lost is the menu of conditioning types, and there are conditions that simply weren't rebuilt past Flux. Tapping the pipe lets you run whatever preprocessing your target actually needs.

The obvious gotcha

There's no validation, so None is possible. Unlike most of the Peek family - CMK Pipe Peek KSampler checks four fields, CMK Pipe Peek Preprocess Detailer validates a contract of required keys - this one just returns whatever's there. If your pipe predates the point where an image exists, or belongs to a path that doesn't set a mask, you get None on that output and ComfyUI handles it the way it handles any None on a typed socket: by complaining somewhere downstream, possibly confusingly.

In practice, mask is the one that goes None most often. A Text2Image run has no mask; a pipe from an inpaint run does. If you're getting an error about a MASK input and you're sure you wired everything, check whether the pipe you tapped ever had a mask in it.

Install

Part of CMKFlow/cmk_nodes. ComfyUI Manager → search CMK Flow → install the CMKFlow entry → restart. Manual, ComfyUI fully closed:

git clone https://github.com/CMKFlow/cmk_nodes.git custom_nodes/cmk_nodes
python3 custom_nodes/cmk_nodes/scripts/install_cmk_requirements.py

Wait for CMK dependency check: OK. ControlNet itself needs model files - the pack's resource checker (scripts/check_cmk_resources.py --models-root /your/shared/models) audits the specific filenames the shipped workflows reference and can fetch the ones with a clear public source. It's honest about what it can't automate, too: anything without a verified download stays visible as a manual case rather than failing silently.

One more thing

This is a Developer-category node (CMK/Developer/Pipe/Peek), which means it's plumbing that CMK's own workflows use rather than something with a friendly on-ramp. If you're new to the pack, start from CMK Flow · 01 START HERE · Create Image and the Flow Browser's reference workflows; come back to the Peek family when you want to bend the flow rather than follow it.

And do install the Vue Nodes setting. CMK's dynamic nodes degrade to plain LiteGraph rendering without it, and the Flow Browser's previews and advanced toggles are a large part of what makes the pack approachable in the first place.

CategoryCMK/Developer/Legacy Pipe

Inputs (1)

NameTypeDefaultDescription
pipeCMK_PIPE—

Outputs (2)

NameTypeDescription
base_imageIMAGE—
maskMASK—