CMK Pipe Get
Dig One Image Out of a Pipe That Has Passed Through Five Stages
- pipe
- image
The pipe pattern is ComfyUI's answer to the graph that has become a plate of spaghetti: instead of twenty wires between modules, you pass one dictionary and let each stage add what it produced. The cost is that consumers have to know what's in the dictionary. CMK Pipe Get is the node that looks for an image and tells you what it found.
How it works
It takes a pipe of type CMK_PIPE and walks four keys in a fixed priority order:
image_face → image_detailer → image_refiner → image_1st_pass
The first one that isn't None is returned as image. That's the whole node. The priority order is the interesting part, because it encodes a policy: if a FaceProcess stage produced an image, that's "the image"; failing that, the detailer's; failing that, a refiner's; failing that, the raw first pass. Later stages win, because in CMK they're more finished.
Two optional controls change what happens when nothing is found. strict (default true) raises - pipe contains no image_face/image_detailer/image_refiner/image_1st_pass - which is what you want in a production graph, because a silent nothing is how you ship a blank output. Turn strict off and the node returns None instead, which is what you want when you're reading a partially-executed pipe or wiring it into a wildcard input.
debug (default false) prints which key was chosen. In a graph where five stages could each have satisfied the request, that one line is the difference between debugging and guessing. Turn it on the first time you wire this node into a new flow, read the line, turn it off.
What the pipes actually are
The pipe is just a dictionary that the flow's stages mutate as they run - image, log, visual and process state accumulating as it travels. That's why this node can't fail with a type error the way a wrong wire would: a pipe is a pipe whether or not it contains anything useful yet. Naming matters. image_1st_pass is the boundary-level artifact, image_refiner is post-refiner, image_detailer is post-detailer and image_face is post-face-module - so if you want the unprocessed image, this is the wrong node, and you should be pulling from the loader instead.
The rest of CMK's pipe family is the same idea at different points: a getter here, forwarders (an IMAGE in, an IMAGE out, no processing), and prepare/execute pairs that package state and then act on it. The pack's own philosophy is explicit about why execute nodes have no pass-through inputs or outputs: a pass-through is a way to create a workflow that looks like it's doing something and isn't.
When you'd use it
Two cases, mostly.
Reading the result of a CMK module for yourself - preview it, run it through your own comparison node, save a copy before the next stage overwrites something. The pipe carries the image; you just need one wire out.
Debugging a flow where the final image is wrong. Wire this node in at a few points with debug on and you'll see which stage last owned the image. If image_face is populated but your preview shows nothing, the problem is downstream of this node, not in the pipeline.
If you need the image and the process state, this isn't your node - it deliberately exposes only the image.
Install
Manager: search CMK Flow, install the CMKFlow entry, restart. Manually, from your ComfyUI root:
git clone https://github.com/CMKFlow/cmk_nodes.git custom_nodes/cmk_nodes
python3 custom_nodes/cmk_nodes/scripts/install_cmk_requirements.py
A manual clone never runs pip on its own, so that second command is required, not optional - and it ends with CMK dependency check: OK when the environment is complete. This node itself is pure Python with no model dependencies, so if it loads and your other CMK nodes don't, you've narrowed it to a dependency or a missing weight file rather than the pack:
python3 custom_nodes/cmk_nodes/scripts/check_cmk_resources.py --models-root "/path/to/ComfyUI-Shared"
Note the pack's frontend requirement while you're here: CMK expects ComfyUI's Nodes 2.0 / Vue setting to be on, and warns at startup when it isn't. These dynamic, type-heavy nodes are the ones that suffer most without it.
Gotchas
strict off plus a downstream node that assumes an image gives you a downstream error anyway, just further from the cause. Keep it on unless you have a reason.
And remember the priority order is not configurable. If you genuinely need the first-pass image while image_face is also populated, this node will not give it to you.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | CMK_PIPE | — | |
| strictopt | BOOLEAN | true | — |
| debugopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |