save_workspace
Write the open workflow to a file, preserving UI layout or converting to API format. Capture unsaved work and break up large graphs for later analysis.
Instructions
Write the workflow open in the browser to a file.
This is how to get at a graph too large to fit in one answer: the reply is a path and a few numbers, and the file can then be read in slices or searched like any other. It is also how an unsaved canvas becomes something that survives the tab being closed.
Args: name: file name, with or without .json. format: "ui" writes exactly what ComfyUI's own Save writes - positions, groups, titles, collapsed state - into the export directory, and it can be opened in ComfyUI again. "api" writes the API-format prompt into the workflows directory, where run_workflow and describe_workflow find it. The two are not interchangeable: UI format keeps the layout and cannot be run, API format is runnable and has no layout at all. scope: "root" for the whole workflow, "active" for the subgraph on screen. overwrite: replace the file if it already exists. client_id: which tab to ask; defaults to the most recently focused one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| scope | No | root | |
| format | No | ui | |
| client_id | No | ||
| overwrite | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||