Nodes/CMK Flow/CMK Flow · Load Image
ComfyUI Node

CMK Flow · Load Image

The loader that also starts your log and your pipe

By CMKFlow·Created 3 months ago·Updated a day ago· 6
CMK Flow · Load Image
  • opt_LOG
  • PROCESS
  • IMAGE
  • MASK
  • FILENAME_STRING
  • LOG
◄image▾►
◄opt_image_file—►
◄opt_intrue►

At first glance this is ComfyUI's Load Image with a different hat on. Same picker, same upload button, same dropdown of files from your input folder. The difference is everything it hands out: four outputs instead of two, because in CMK the loader is also the entry point for the pipeline.

Outputs, and why there are four

  • PROCESS - a CMK_PIPE context with the image, a copy of the image marked original, the mask and original mask, width, height, source width/height, and the filename baked in. Downstream CMK modules read sizes and source paths off this instead of you wiring a Get Image Size node.
  • IMAGE - the plain tensor, so native or non-CMK nodes can use it without knowing anything about pipes.
  • MASK - derived from the alpha channel.
  • FILENAME_STRING - which the pack uses for its Create Image / save modules, i.e. output naming comes from the input filename.
  • LOG - a fresh log pipe with a Load Image block already containing the filename, resolution, frame count and source format.

That last one is the quietly nice part. Every CMK module appends to a log pipe, and if you're not using a flow module at the start of the graph, you'd otherwise be holding a dangling LOG input with nothing to connect. This loader seeds it.

Inputs

image is required: the picker, with upload enabled. The dropdown mixes your input folder with a set of reference files that ship inside the pack - black.png, face_reference.png, controlnet_reference.png, detailer_reference.png, faceswap_reference.png, inpaint_reference.png and friends - so the bundled workflows run on a clean install instead of demanding you supply assets.

Two optional inputs:

  • opt_LOG - feed an existing log pipe in and the loader appends to it instead of starting its own chain.
  • opt_image_file - a STRING that overrides the picker entirely. Per the source, that's for "a centrally distributed ComfyUI file reference"; the picker becomes the fallback when it isn't connected. Handy when a subgraph input supplies the filename.

The mechanism bits worth knowing

Alpha handling: it reads the alpha channel and inverts it (1.0 - alpha/255), so transparent pixels arrive as mask = 1.0. No alpha channel → an all-zero mask of the right shape, not an error.

Animated files: it iterates frames with PIL's ImageSequence and concatenates them into a batch, applying EXIF rotation per frame. So a multi-frame file gives you batch N, and everything downstream that assumes one image gets N. This is the single most common "why did my graph run eight times" moment with this node - and it's exactly what CMK Image QuickMetrics is for.

Caching: IS_CHANGED hashes the file contents. Edit an image in place, keep the same filename, and the graph re-runs anyway. Nice detail; lots of loaders don't do it. Filenames also come back with a source-descriptor preview (input/output/temp), decided from the path you actually resolved rather than the widget.

Install

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

Manager route: search CMK Flow (registry cmk-flow, publisher CMKFlow) → install → restart. The install script matters - a clone alone never runs pip, and the pack's requirements include insightface, onnxruntime, ultralytics, segment-anything, opencv-python and nudenet==3.4.2. For previews during sampler runs, set Comfy → Execution → Live preview method to auto.

Two realistic gotchas

Invalid image file: <name> is the VALIDATE_INPUTS message, and it means exactly what it says - the file is gone or moved. The pack's packaged references are checked against the pack's own assets/references folder, so if you installed with part of the repo missing (a manual copy that skipped folders), those entries appear in the dropdown and fail on queue.

The other one is context, not code. CMK Flow is a young pack from a single author, Carsten Kirschner, open-sourced in July 2026. Its Reddit footprint is three posts by the author himself, the announcement sitting at 14 points with one comment. That's not an endorsement or a warning - it just means when something misbehaves, there's very little "someone already asked this" to find. The pack's compensating habit is that it narrates itself: this loader's log block tells you the resolution, frame count and format it actually loaded, before you queue a 30-second generation to find out.

CategoryCMK/Flow/Input

Inputs (4)

NameTypeDefaultDescription
imageCOMBO17 options: CMK Package · black.png, CMK Package · clipspace-mask-1792499379891.png, CMK Package · face_reference.png, CMK Package · controlnet_reference.png, CMK Package · controlnet_reference4.png, CMK Package · detailer_reference.png, +11
opt_LOGoptCMK_LOG_PIPE—
opt_image_fileoptSTRING—
opt_inoptBOOLEANtrue—

Outputs (5)

NameTypeDescription
PROCESSCMK_PIPE—
IMAGEIMAGE—
MASKMASK—
FILENAME_STRINGSTRING—
LOGCMK_LOG_PIPE—