load_workspace
Open a saved workflow from the workspace into a new ComfyUI tab, with backup of the current canvas before replacing.
Instructions
Open a saved workflow in the browser, as a tab in the ComfyUI window.
The other half of save_workspace, and the way to put a workflow file under the workspace tools: load it, edit it with them, save it back. Without this they can only reach whatever the user happened to have open.
Both formats work and neither has to be named - a file in workflows/ is API
format, one in exports/ is UI format, and this reads which it is. UI format
keeps the layout it was saved with; API format has none, so ComfyUI lays it
out itself and the result is tidy rather than familiar.
It opens a tab rather than replacing the one on screen. ComfyUI reuses a tab only when its own workflow store already knows the name, and that store does not sync from this server's workflows directory - so a file usually arrives in a new tab marked unsaved, with the workflow that was on screen still open in its own. Loading that same file again reuses the tab it made the first time, and that one is replaced. The reply reports the tabs and whether one was added; switch_workspace_tab moves between them afterwards.
A name ComfyUI already knows is refused. It resolves the name against its
own saved workflows rather than against the directory the file came from, so
a file whose name matches one of the user's workflows would fill that
workflow's tab instead of opening one - leaving it looking edited, one Ctrl+S
from overwriting their work. Rename the file, or pass force when replacing
that workflow is the actual intent.
This is not undoable. ComfyUI resets the undo history when a workflow is loaded, so Ctrl+Z will not bring the previous canvas back. That is what the backup is for, and it is the reused-tab case it covers: the canvas is written to the export directory first and the reply names the file.
Args: name: the file, with or without .json. Looked for in the workflows directory first, then the export directory; an absolute path also works. backup: write the current canvas to the export directory before replacing it. Leave it on unless the canvas is known to be worth nothing. force: load even when ComfyUI already has a saved workflow of this name, taking over its tab. Only when replacing that workflow is meant. client_id: which tab to load into; defaults to the most recently focused one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| force | No | ||
| backup | No | ||
| client_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||