How does comfy-cli / cm-cli work out which custom nodes a workflow needs (deps-in-workflow, install-deps), and what can it get wrong?
Problem. Installing the right packs for a downloaded workflow without opening the GUI. Conditions. ComfyUI-Manager commit a74929c6; comfy-cli reference lists deps-in-workflow, install-deps (--workflow accepts .json or .png, --deps a dependency spec, --mode remote|local|cache). Method. extract_nodes_from_workflow loads the workflow JSON (or the 'workflow' text chunk of a PNG), collects every node's 'type' (skipping Reroute, Note and workflow/ group nodes, and expanding extra.groupNodes), then maps node-type names to extension repositories using extension-node-map.json from the chosen channel/mode. Matching order: preemption map, reverse map (first listed extension wins when several provide the name), then nodename_pattern regexes; unmatched names become unknown_nodes. Failure modes. It matches on class names only, so it ignores pack versions or commits recorded elsewhere in the file; a name provided by several packs resolves to the first; nodes not in the map are reported unknown, no...
Structured fields
{
"citations": [
{
"url": "https://raw.githubusercontent.com/Comfy-Org/ComfyUI-Manager/a74929c65b49d7d7d81b9a6f140de878a818b893/glob/manager_core.py",
"note": "extract_nodes_from_workflow; extract_nodes_from_workflow; install-deps options"
},
{
"url": "https://docs.comfy.org/comfy-cli/reference.md",
"note": "extract_nodes_from_workflow; extract_nodes_from_workflow; install-deps options"
}
]
}Evidence claims
- [sourced_fact] Problem. Installing the right packs for a downloaded workflow without opening the GUI. Conditions. ComfyUI-Manager commit a74929c6; comfy-cli reference lists deps-in-workflow, install-deps (--workflow accepts .json or .png, --deps a dependency spec, --mode remote|local|cache). Method. extract_nodes_from_workflow loads the workflow JSON (or the 'workflow' text chunk of a PNG), collects every node's 'type' (skipping Reroute, Note and workflow/ group nodes, and expanding extra.groupNodes), then maps node-type names to extension repositories using extension-node-map.json from the chosen channel/mode. Matching order: preemption map, reverse map (first listed extension wins when several provide the name), then nodename_pattern regexes; unmatched names become unknown_nodes. Failure modes. It matches on class names only, so it ignores pack versions or commits recorded elsewhere in the file; a name provided by several packs resolves to the first; nodes not in the map are reported unknown, not installed; PNGs without a 'workflow' chunk (API-only submits) fail. Installing from the map is installing arbitrary third-party code, so security levels in Manager config still apply. Limitations. Code reading only; the extension map content is remote data that changes. Version and date. Manager commit a74929c6. · locator: extract_nodes_from_workflow; extract_nodes_from_workflow; install-deps options source
Rights
| component | license | hosting | redistribution | modification | training | Evidence and notes |
|---|---|---|---|---|---|---|
| documentation | unknown | permitted | permitted | unknown | unknown | Applies to this original summary only, not to the cited sources. |