Nodes/ComfyUI Remote Call/工作流解析
ComfyUI Node

工作流解析

What is this workflow asking for? Parse tells you before you send it anywhere

By playboy-dongan·Created 6 months ago·Updated 6 months ago· 1
工作流解析
    • 可配置输入_JSON
    • 输出节点_JSON
    • 输入项数
    • 输出节点数
    • 工作流_JSON
    工作流_JSON

    工作流解析, "workflow parse," is the node that makes the rest of this pack usable. It reads the workflow you want to run remotely and answers two questions you'll otherwise have to answer by eyeballing raw JSON: what does this workflow accept as inputs, and which nodes are its outputs? Those answers are exactly what you need to fill in the transfer and override nodes downstream.

    The catch, and it's an important one: it only understands API format. If you're new to this, here's the thing - ComfyUI has two completely different workflow exports. The canvas save (UI format) stores a nodes array full of type fields and pixel coordinates. The API format (File → Save (API Format)) is a lean dict of node_id: {class_type, inputs}, where each input value is either a literal or a [node_id, slot] connection. This pack runs on API format because that's the exact structure ComfyUI's /prompt endpoint eats - you can't POST the UI format to it. Parse enforces that, and its error messages are surprisingly helpful when you get it wrong.

    How it works

    Give it 工作流_JSON (a wire input, usually from 工作流上传). It digs the prompt dict out of the JSON - it tolerates the workflow wrapped in a prompt key or a workflow.prompt, which covers most exports - then does two passes over the graph:

    • Output nodes are the leaf nodes: any node ID that no other node references as an input. In a normal generation workflow that's your Save Image / Save Video / Preview node.
    • Configurable inputs are the direct values - every input that isn't a wire connection, grouped by node. These are the knobs you're allowed to touch.

    If it sniffs the UI format (a type field where it expects class_type), it returns empty results plus a message telling you to re-export with File → Save (API Format).

    The outputs

    • 可配置输入_JSON (STRING) - pretty-printed JSON of node_id → {class_type, inputs} for every node with direct values. This is your cheat sheet: the node IDs and field names you'll plug into 传输节点 and 参数覆盖.
    • 输出节点_JSON (STRING) - the leaf nodes, as {node_id, class_type}.
    • 输入项数 (INT) and 输出节点数 (INT) - quick counts.
    • 工作流_JSON (STRING) - the original workflow, compacted, passed straight through to wire into 上传提交.

    You don't parse those JSON strings by hand in normal use - you read them to learn the node IDs, then type those IDs into the transfer and override nodes.

    Installing it

    Same pack, same steps as the others: ComfyUI-RemoteCall via ComfyUI Manager (search ComfyUI-RemoteCall or 远程调用), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/playboy-dongan/ComfyUI-RemoteCall
    

    Dependencies are requests and av, no model files. Restart after installing.

    The trap

    The only real failure mode is feeding it a UI-format workflow - you'll get empty JSON outputs and a message that reads like a lecture, because it kind of is. If you're exporting from the ComfyUI menu, make sure it says "Save (API Format)", not just "Save". Past that, the workflow sails through, and you finally know what node IDs to aim your transfers at.

    Category远程调用

    Inputs (1)

    NameTypeDefaultDescription
    工作流_JSONSTRING

    Outputs (5)

    NameTypeDescription
    可配置输入_JSONSTRING
    输出节点_JSONSTRING
    输入项数INT
    输出节点数INT
    工作流_JSONSTRING