edit_workflow
Apply a batch of edits to a ComfyUI workflow. Operations include adding, removing, connecting nodes, setting widget values, titles, and modes.
Instructions
Apply batched edits. Each op is a dict with 'op' plus:
{"op": "add_node", "class_type": str, "title"?: str, "widgets"?: {name: value}}
{"op": "remove_node", "node_id": int}
{"op": "connect", "from_node": int, "from_output": str|int, "to_node": int, "to_input": str}
{"op": "set_widget", "node_id": int, "input": str, "value": any}
{"op": "set_title", "node_id": int, "title": str}
{"op": "set_mode", "node_id": int, "mode": int} # 0 normal, 2 mute, 4 bypass
Output slot names and widget names come from get_node_info. Annotation nodes (class_type "Note" or "MarkdownNote") are supported with a single widget 'text'. Ops apply in order; a failing op stops the batch, reports what succeeded, and leaves the graph unchanged by the failing op.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operations | Yes | ||
| workflow_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||