Nodes/CMK Flow/CMK Flow · Visualizer
ComfyUI Node

CMK Flow · Visualizer

The one node at the end that saves, previews and optionally upscales

By CMKFlow·Created 3 months ago·Updated a day ago· 6
CMK Flow · Visualizer
  • MODEL ZIT
  • PROCESS ZIT
  • IMAGE ZIT
  • LOG ZIT
  • VISUAL ZIT
  • MODEL SDXL
  • PROCESS SDXL
  • IMAGE SDXL
  • LOG SDXL
  • VISUAL SDXL
  • MODEL (opt)
  • PROCESS
  • IMAGE
  • LOG
  • VISUAL
    ◄SAVE ENABLEDtrue►
    ◄filename prefiximage►
    ◄output folder►
    ◄use date foldertrue►
    ◄enable upscalefalse►
    ◄limit 4x MP1.5►
    ◄limit 2x MP8.0►
    ◄model 4xnone►
    ◄model 2xnone►

    Every CMK Flow graph ends in the Visualizer. It is the pack's terminal node: it renders the accumulated visual chain, writes the result to disk, and - if you ask it to - runs an upscale pass on the way out. Where the rest of CMK is a set of modular -Pipe- stages, this is the single point where the run becomes files on your drive.

    It's categorised CMK/Flow/Core, which is accurate: it is not optional decoration, it's the output contract of the guided flow. It has a lot of inputs, all optional, and no outputs at all - nothing to wire onward.

    How it works

    Three jobs, in order.

    Preview. The VISUAL input carries an accumulating registry of providers - one per module that had something to show, each with a stable instance identity, a label, a sequence, and named channels like result, source, before, after. The Visualizer asynchronously saves each channel as a preview PNG and emits the whole thing to the frontend as JSON, which is how you get the module tabs and the press-and-hold comparison. Providers are evaluated capability-driven; the Visualizer contains no list of known CMK modules, so anything that publishes properly shows up.

    Optional upscale. With enable upscale on, the image goes through the pack's Smart Upscaler, using the MP limits and model choices below. The upscaled result gets registered as an extra provider with before/after channels so you can compare it against the un-upscaled result - genuinely useful, since upscales fail quietly more often than they fail loudly.

    Save. If SAVE ENABLED is on, the image is written through the pack's project-save node using your prefix, folder and date-folder settings. In the same breath the node unpacks the CMK result pipe, and if the model context is a post-process model marked for unloading, it releases it here - so the last thing that happens in a CMK run is VRAM coming back.

    Also note IS_CHANGED returns float("NaN"), the ComfyUI idiom for always-dirty. A display-and-save node has to run every execution, so this is right - but it does mean the Visualizer always executes, unlike the cacheable stages upstream.

    Inputs and outputs

    The ones that matter to a beginner:

    • VISUAL - the chain. Wire it from the last module, and the module order in the panel follows the order of the chain, not the sequence numbers.
    • IMAGE - the final image. This is what gets saved and upscaled.
    • SAVE ENABLED - default on.
    • filename prefix - default image. Pair it with CMK SourcePathInfo if you want the prefix to follow your input file.
    • enable upscale - default off. Turn it on and set model 4x / model 2x to a model from models/upscale_models, with limit 4x MP (default 1.5) and limit 2x MP (default 8) deciding how far each is trusted.

    And the rest: MODEL (opt), PROCESS, LOG - the family-neutral CMK context wires, typed as wildcards so they accept whatever the preceding boundary hands over - plus output folder and use date folder for where the file lands.

    No outputs. That trips people up once: if you want the final image downstream, you take it from before the Visualizer, not from it.

    Install

    Manager → search CMK Flow → install → restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/CMKFlow/cmk_nodes
    python3 custom_nodes/cmk_nodes/scripts/install_cmk_requirements.py
    python3 custom_nodes/cmk_nodes/scripts/check_cmk_resources.py --models-root "/path/to/shared/models"
    

    Upscaling is where this node gets resource-dependent: the resource checker knows the specific filenames the shipped workflows expect for SDXL, Z-Image Turbo, face restore and RealESRGAN, and it will list each as FOUND or MISSING and offer to download the missing ones. It also registers your shared models folder in extra_model_paths.yaml the first time you pass --models-root, which needs a restart to take effect.

    Common issues

    • Nothing appears in the panel. Vue Nodes / Nodes 2.0 off, or an empty visual chain because every module upstream was disabled. CMK deliberately doesn't fabricate a tab for a module that produced no image signal.
    • Files are saved somewhere unexpected. use date folder subdivides by date; output folder overrides the base. Clear both and it behaves like a normal ComfyUI save.
    • The upscale button is on but nothing changed. The MP limits are guards, not targets, so an already-large image may skip a path entirely. Also check a model is really selected - model 4x/model 2x default to whatever it finds, which can be none.
    • Running a workflow twice does everything twice. The Visualizer's always-dirty behaviour is expected; if the expensive stages also re-run, look upstream for a permanently dirty node - a random picker, or anything returning NaN - because one of those poisons ComfyUI's cache for everything behind it.
    CategoryCMK/Flow/Core

    Inputs (24)

    NameTypeDefaultDescription
    MODEL ZIToptCMK_MODEL_PIPE—
    PROCESS ZIToptCMK_PROCESS_Z_IMAGE—
    IMAGE ZIToptIMAGE—
    LOG ZIToptCMK_LOG_PIPE—
    VISUAL ZIToptCMK_VISUAL_PIPE—
    MODEL SDXLoptCMK_MODEL_PIPE—
    PROCESS SDXLoptCMK_PROCESS_SDXL—
    IMAGE SDXLoptIMAGE—
    LOG SDXLoptCMK_LOG_PIPE—
    VISUAL SDXLoptCMK_VISUAL_PIPE—
    MODEL (opt)opt*—
    PROCESSopt*—
    IMAGEopt*—
    LOGopt*—
    VISUALoptCMK_VISUAL_PIPE—
    SAVE ENABLEDoptBOOLEANtrue—
    filename prefixoptSTRINGimage—
    output folderoptSTRING—
    use date folderoptBOOLEANtrue—
    enable upscaleoptBOOLEANfalse—
    limit 4x MPoptFLOAT1.50–100—
    limit 2x MPoptFLOAT8.00.5–100—
    model 4xoptCOMBOnone1 options: none
    model 2xoptCOMBOnone1 options: none

    Outputs (0)

    No outputs