Nodes/MKRShift_Nodes/Watch Folder Plan
ComfyUI Node

Watch Folder Plan

Describe a watch folder as JSON — the config half of the drop-file handoff

By criskb·Created 7 months ago·Updated 5 months ago· 0
Watch Folder Plan
    • watch_folder_plan_json
    • manifest_line
    • summary_json
    watch_path
    pattern*.png
    ingest_modelatest

    MKRWatchFolderPlan is a config node that turns "watch this folder" into a reusable JSON contract. It does not watch anything itself - the name says Plan and it means it. What it produces is a watch_folder_plan_json that another node (like MKRWatchFolderWrite) or an external addon consumes to know which folder to look at, which files to care about, and how to ingest them.

    This is the "drop a file in a folder and the other side picks it up" pattern, made graph-friendly. It's how a ComfyUI graph hands a job file to another process - a render farm, a DCC tool, a second machine - without any network plumbing on the ComfyUI side: one side writes a payload into a watched directory, the other side notices the new file and acts. In this pack's philosophy everything is a packet and a contract; this node is the contract.

    The inputs are minimal and self-explanatory:

    • watch_path - the folder to watch. The one input you always set.
    • pattern - the file glob to care about, default *.png. Frames, job files, whatever the consumer expects.
    • ingest_mode - latest (the newest matching file), sequence (frame-sequence aware), or all_changed (everything that changed). This is the field that says how the consumer should pick files up once it notices them.

    Outputs: watch_folder_plan_json (the plan, schema mkrshift_watch_folder_plan_v1), a comma-joined manifest_line (path, pattern, mode) for logging, and summary_json with a has_path flag so you can confirm you actually set a folder.

    Install

    Part of MKRShift Nodes - install the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/criskb/MKRShift_Nodes
    

    or ComfyUI Manager → search MKRShift_Nodes → restart. No pip dependencies, no ffmpeg needed - this node is pure JSON in, JSON out.

    Where people get burned

    The one-shot confusion is expecting the plan to start watching the folder. It won't - you've built a contract, not a daemon. To make the handoff actually happen you pair the plan with MKRWatchFolderWrite (writes a payload into the folder from the plan) or an addon that listens on the other side. Also check summary_json's has_path after building: the node builds a valid-looking plan even with an empty watch_path, and an empty path is a plan that points nowhere.

    CategoryMKRShift Nodes/Addons/Network

    Inputs (3)

    NameTypeDefaultDescription
    watch_pathSTRING
    patternSTRING*.png
    ingest_modeCOMBOlatest3 options: latest, sequence, all_changed

    Outputs (3)

    NameTypeDescription
    watch_folder_plan_jsonSTRING
    manifest_lineSTRING
    summary_jsonSTRING