fetch_template
Retrieve a template's workflow JSON to a local path and verify if it can run on your ComfyUI install, enabling immediate execution or identifying missing components.
Instructions
Write a template's runnable workflow JSON to out_path; report if it can run here.
Wraps comfy templates fetch <name> --out <path>. Returns {"path": ..., "local_check": {...}} — completing the on-ramp::
result = fetch_template("flux_dev", out_path)
if result["local_check"].get("runnable"):
run_workflow(result["path"])
else:
... # relay what's missing, or validate_workflow(result["path"]) firstStep 4 is not optional — gallery content is never compared to this install until then.
Args:
out_path: only the user can write here — a shared path risks TOCTOU
between the check and the run.
check_local: True (default) makes local_check BE step 4.
{"checked": false} means the comparison could not be made — it
leaves step 4 UNDONE; run validate_workflow first. False
moves the gate onto you, it does not remove it. Read with
.get("runnable"); a checked: false block has no such key.
Gotchas:
- A bare validate_workflow is WEAKER than local_check: an old
UI-export file checks ZERO nodes, reporting valid: true (blind spot 3)
— watch non_node_key warnings with no converted_from_ui.
- Freshness: CACHED, 24h TTL as of v1.14.0 (this server's floor);
refresh with comfy templates refresh. NOT read from the local
install.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| out_path | Yes | ||
| check_local | No |