Zum Inhalt springen
Node packÜberprüftExtern

Run Once Group Toggle

Betreuer@ssain3d-lgtmUnratedBewertung

Paketprofil

Status
Überprüft
Verleger
@ssain3d-lgtm
Sterne
0

README

ComfyUI Run Once Group Toggle

Bypass a group for one queue submit, then put it back.

Add the node, tick the groups you want, press Run. Those groups are bypassed for that submit only, and when the queue empties every node returns to the mode it actually had — not to a guessed default.

Useful when part of a graph is expensive and you only want it sometimes, without hunting down every node and pressing Ctrl+B twice.

Install

Search Run Once Group Toggle in ComfyUI Manager, or clone it yourself:

cd ComfyUI/custom_nodes
git clone https://github.com/ssain3d-lgtm/comfyui-run-once-group

Restart ComfyUI, then hard-refresh the browser (Ctrl+F5). No dependencies.

Use

  1. Add Run Once Group Toggle anywhere on the canvas.
  2. Press Pick groups on the node (or right-click it — same menu). Clicking an unticked group adds it; a ticked group opens a small menu: its mode for the run (Default / Bypass / Mute / Active) and Remove. The chosen groups collect in the group_titles box, one per line, and the last entry clears them all.
  3. Pick mode_during_run. It is the default for every line that does not set its own.

The badge in the node's title bar says what will happen, so you never have to open the console to find out:

BadgeMeaning
3 groupsthree chosen, all three found
1/2 groupsone title matches nothing — renamed group, or a typo
holding 12a run is in flight and 12 nodes are switched right now
no groups / offnothing chosen, or enabled is off

A title that matches nothing also gets its own ✖ … (not in this graph) row in the picker, so a group renamed out from under your list is visible and one click removes it.

ModeWhile runningAfter
Bypass (default)the group is skippedrestored
Activea normally-off group runsrestored
Mutefully offrestored

Turning enabled off makes the node do nothing.

Writing titles

Newline is the only separator. Commas are not, because titles routinely contain punctuation — D. Upscale · Interpolate (all bypassed) would be shredded by a comma split and match nothing. Leading and trailing spaces, blank lines and duplicates are cleaned up for you.

A line may end with = Mode to give that one group its own mode for the run:

Warmup = Active
Upscale
Face fix = Mute

Upscale uses mode_during_run; the other two override it. The suffix only counts when the part after the last = is exactly Active, Mute or Bypass (any casing, spaces optional), so a title like A = B Group is still read as one whole title. The picker's mode submenu writes and clears these suffixes for you.

A typo on one line does not stop the rest: the groups that matched are still applied, and only the missing title is called out — on the badge before the run, as a toast at the moment it costs you work, and in the console with the graph's current group list.

Renaming a group does not break the list

Every group carries a stable litegraph id, and the node remembers which id each line meant (under properties["sain3.runOnce.ids"], saved with the workflow). When a title stops matching but the remembered id still exists, the group is followed and the line is rewritten to its new title — mode suffix intact — the next time you run or open the picker. The ✖ rows in the picker now mean the group is genuinely gone, or the line predates the annotations.

The lines stay authoritative: hand-typed titles match by name and pick up an id on first use, and losing the annotations only degrades matching back to titles. Two groups with the same title still collapse to one line and match the first — rename one of them if you need them targeted separately.

Overlapping groups are safe. If one node belongs to two groups you selected, the first claim records its original mode and it is restored exactly once.

Different modes at once

One node is enough: give each

Knoten in diesem Paket

1 Knoten
  • RunOnceGroupMode

Quellen

3 Quellen
GitHubQuelleVersion 7c9b3e9253023f2e9330d0f40bf6770e5dd90c2b
github.com/ssain3d-lgtm/Comfyui-Run-Once-Group

Verifiziert 13. Sept.