1 Commits
Author SHA1 Message Date
BISAM20andClaude Opus 5 4cdbe5b3fb feat: detect and download the models a workflow needs
ComfyUI templates annotate loader nodes with properties.models, giving the
download URL and target folder for every file they need. The new "Workflow
Models" tab reads that metadata so a template's models can be fetched in one
click instead of hunting down each link by hand.

Sources: the graph currently open on the canvas, or any of the bundled
ComfyUI templates, grouped by category and filterable by title, description
or model name. The right panel groups the results by model type and shows
size, destination folder and whether each file is already on disk, with a
"Download all missing" action. Rows reuse the existing file-row renderer, so
progress bars, stop buttons and download polling work unchanged.

Extraction walks the workflow recursively rather than scanning
workflow["nodes"]. Newer subgraphed templates keep their loaders under
definitions.subgraphs[].nodes[], where a top-level scan finds nothing at all —
03_video_wan2_2_14B_i2v_subgraphed.json has zero models on top-level nodes and
six inside its subgraph. Of 378 installed template files, 162 declare models,
641 entries in total.

The template's own "directory" field decides the destination; only when it is
absent does the filename classifier take over, and such rows are marked as
guessed. Size lookups run eight at a time and are skipped past 40 files so the
tab cannot stall on a slow host.

Template index loading only caches a non-empty result. The index can fail
transiently while ComfyUI is still starting, and caching an empty array left
the tab permanently blank for the rest of the session; a failure now reports
the reason and offers a retry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 10:50:58 +02:00