set_workspace_selection
Highlight nodes and groups on the ComfyUI canvas to show which elements are meant. Clears selection when none specified; useful before edits and to answer 'which ones?'
Instructions
Highlight nodes and groups on the canvas, so the user can see which ones you mean.
The write half of what get_workspace_graph reports as selected. Pointing is how
people hand work over, and it is worth having in both directions: four node ids in
a sentence are hard to check, while four highlighted boxes are not. Use it before
an edit the user should agree to, and to answer "which ones?" without a list.
Selecting nothing clears the selection. A selection is not part of the workflow, so this does not go on the undo stack and Ctrl+Z will not take it back.
Args:
nodes: node ids to select, as they appear in get_workspace_graph. They are
local to the graph on screen - navigate_workspace first for a subgraph,
and drop any 98:12 prefix once inside.
groups: group ids or titles to select as well.
add: add to what is already selected instead of replacing it.
centre: move the view to fit the selection. Off by default, since the user
may be looking somewhere deliberately.
client_id: which tab; defaults to the most recently focused one.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | ||
| nodes | No | ||
| centre | No | ||
| groups | No | ||
| client_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||