- DocKeyList primitive: controls/options render as highlighted accent term-chips + spaced descriptions instead of a wall of bold bullets. - DocSection: flex-column rhythm (even spacing; images no longer sit flush against text) + accent-colored bold so highlights aren't carried by weight alone. - WP Context Loop page uses DocKeyList for its controls. - Remove the FALSE claim that Ctrl-B doesn't work on WP Context Loop (it works fine, as does Ctrl-M) — from the node page, the seeds-and-loops concept page, and the WP_ContextLoop help doc. The config Bypass switch is described accurately (collapses to a single run, keeps the node wired).
2.5 KiB
2.5 KiB
WP Context Loop
Optional power-user node that loops a WP_Context chain N times in a single workflow run, producing N variations.
Inputs
| Name | Type | Notes |
|---|---|---|
seed |
INT |
Base seed widget. Has control_after_generate (randomize / fixed / increment buttons). Right-click → "Convert widget to input" to wire rgthree's Seed (or any INT source) instead. |
count |
INT |
How many iterations. 1 = no loop. |
strategy |
chips | How to derive N seeds from base. hash_index (default) is independent per-iteration; sequential is base, base+1, …; stride is base + i × 1,000,003. |
override_seed |
switch | When OFF (default): seed is ignored. Downstream WP_Context widget seeds drive each node; loop iteration only adds XOR variation. When ON: seed becomes the base; derived N times via strategy; replaces downstream widget seeds. |
iteration var |
text | Stamps $<name> (0..N-1) and $<name>_total (N) into each iteration's context. Default iteration. |
bypass |
switch | Skip the loop. Behaves as count=1. |
Outputs
| Name | Type | Notes |
|---|---|---|
context |
PIPELINE_CONTEXT (list) |
One payload per iteration. ComfyUI auto-iterates downstream nodes per item. |
How it works
Each iteration runs the downstream chain with a different seed. Locked modules (any wildcard with a locked seed) ignore the loop — they always roll their fixed seed. Everything else varies per iteration.
Concrete example: count=3, override_seed=ON, seed=42, strategy=sequential → downstream WP_Context chain runs three times with chain seeds 42, 43, 44. PromptAssembler emits three prompts; KSampler renders three batches; SaveImage writes three files.
Tips
- The
seedfield is a stock ComfyUI INT widget withcontrol_after_generate— same randomize / fixed / increment buttons KSampler exposes. Right-click → "Convert widget to input" to swap it for an rgthree Seed wire when you want its UI affordances. - Set
override_seed=OFF(default) to let each WP_Context's own widget seed drive that node's rolls; loop iteration still varies results via XOR withloop_index. Setoverride_seed=ONto take central control. - Combine with
$iterationin your prompt template for variation labels:"variation $iteration of $iteration_total: ...". - The
bypassswitch collapses the loop to a single run (count=1) while keeping the node wired — handy for A/B without rebuilding the graph. Native ComfyUI bypass (Ctrl-B) and mute (Ctrl-M) also work as usual.