Preset Switch
One integer flips your whole workflow between saved setups
- preset_index
Say you have one workflow that does three jobs: a base render, a base-plus-upscale pass, and a version where half the nodes are bypassed for quick previews. Right now you toggle nodes by hand every time, or you keep three copies of the graph around. Preset Switch records those enable/bypass states once and lets you jump between them by changing a single preset_index integer. That's the whole pitch, and for a "record / switch / repeat" workflow it works well.
It ships in the same pack as Preset Group Editor, from CarlMarkswx/comfyui_workflow_preset_switch - a small, new, bilingual (Chinese/English) plugin whose project name is "ComfyUI Workflow State Presets". Before you get excited about the name, one honest caveat: this is Phase 1. It only captures node mode/bypass states. Sampler values, prompts, and seeds are not part of a preset yet, and the README says parameter snapshots and link switching are planned, not shipped. Don't install it expecting it to save your KSampler settings.
How it works
The Python class is a skeleton - it passes an int through. Everything real happens in web/preset_switch.js, a frontend extension that hooks the node's widget and buttons. When you hit Record Current, it snapshots every node's mode and bypass state into workflow.graph.extra.comfyui_workflow_state_presets, which is saved inside the workflow file itself. Change preset_index and the extension auto-applies that snapshot: sets modes, toggles bypass flags, redraws. Because presets are keyed by node id, adding a node after recording a preset is handled by policy - new/untracked nodes default to bypass so an old preset doesn't unexpectedly change behavior. You can flip that to preserve or enable via the onUntrackedNode option.
A nice touch: if preset_index is wired to an upstream numeric node instead of typed in, the extension resolves the value through the chain - it even walks through Reroute nodes to find the number. So you could drive presets from a controller or another node's value rather than hand-editing.
The inputs that matter
There's exactly one input, and it's the whole node:
preset_index(INT, default 0, min 0, max 999999) - which preset is active. Setting it triggers the switch.
The output is the same value, passed through as preset_index: INT. That matters more than it looks: you can chain this downstream so the rest of your graph knows which variant is running. It's also how the preset limit question is dodged - the dev notes explicitly call out that this replaces switching nodes with fixed input caps (like a 10-slot limit). Here presets are stored dynamically, so the number is unbounded.
The actual workflow lives in the node's buttons: Add Preset, Record Current, Delete Selected, Prev/Next Preset, Rename Current, and a Preset Browser panel that lists presets with click-to-switch.
Install
Easiest is ComfyUI Manager: search comfyui_workflow_preset_switch (or "workflow preset") and install, then restart. Manually:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/CarlMarkswx/comfyui_workflow_preset_switch
Then restart ComfyUI and add the node as Preset Switch (it's under the workflow/preset category). No dependencies, no model downloads, no pip installs - the pack is pure Python plus JS, GPL-3.0.
Where people get burned
- The name mismatch. The repo is
comfyui_workflow_preset_switch, but the README tells you to clone into a folder calledcomfyui_workflow_state_presets. Both work (imports are relative), but don't end up with two copies incustom_nodesor you'll double-register the nodes. - Buttons missing? This node is dead without its frontend extension. If the node appears but the buttons/apply behavior don't, the JS didn't register - restart ComfyUI and check the browser console.
- New nodes get bypassed. Record a preset, then add a node and apply the old preset: your new node silently bypasses. That's the
onUntrackedNode: "bypass"default. It's a safe default, just surprising the first time. - Presets travel with the workflow, not your machine. They live in
graph.extra, so they're workflow-scoped - no global library yet. Sharing the workflow shares the presets, but they restore by node id, so missing nodes are skipped with console warnings.
It's a young pack with a small footprint, so treat it as a convenience layer, not infrastructure. For per-group toggling specifically, rgthree's Fast Groups Bypasser is the more battle-tested dashboard; Preset Switch's edge is that whole-workflow presets are one integer away.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| preset_index | INT | 00–999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| preset_index | INT | — |