Shuffle wildcards in the ComfyUI queue

A shuffle wildcard in Style Grid for ComfyUI walks through a category one style at a time and doesn't repeat until it has used them all. Combined with the queue, that gives you a simple way to run a whole category against one scene and compare the results. This guide shows how.
The token
{sgd:category} is the shuffle form. Its random cousin {sg:category} can pick the same style twice in a row. The shuffle can't.
Insert it from the panel: right-click a category in the sidebar and choose Shuffle. Or type it into the node's text field.
One queue run, one draw
The Style Grid node resolves its text once per run. So the deck moves one step every time the workflow is queued. A latent batch of four in a single run gives you four images in the same style, because they all share that one draw.
To step through the deck, queue more runs. Set the batch count next to the Run button to the number of styles you want to see and press Run once.
The deck strip
While a shuffle chip is active, the panel shows a line under the chips, like seed 52113, next draw #4. It tells you which deck you're on and which position comes next.
Restart goes back to the first draw of the same deck. Use it to repeat a sweep in the same order.
New deck picks a new seed and starts from the first draw, in a new order.
The deck strip at the bottom of the panel: an active shuffle chip, the deck seed and the next draw.
The position advances on its own after every run. The deck seed and position are saved with the workflow, so you can close ComfyUI and pick up where you stopped.
A clean comparison
If the image seed changes on every run, you're comparing two things at once: the style and the composition. For a fair look at a category, hold everything else still.
Set the KSampler's seed control to
fixed.Put your scene in the Style Grid node and add one shuffle token, for example
{sgd:lighting}.Press Restart in the deck strip, so the sweep starts at draw #1.
Set the batch count to the size of the category, or to as many as you want to see.
Run.
Every image now has the same composition and a different style from the category.
Four draws from a lighting shuffle on one character.
Sweep a part of a category
Big categories take a while. Use a slice to sweep only the styles you care about:
{sgd:lighting:Golden_Hour_Sunset,Neon_Colorful,Rim_Light,Candlelight}Or exclude a few and keep the rest:
{sgd:lighting:-Dim_Dark,-Low_Key}You don't have to type these. Choose Pick styles… in the category menu, tick the styles, switch the bar to Shuffle and click Add wildcard. The chip in the tray shows how many styles the slice holds, which is the number to put in the batch count.
Know which style made which image
The deck is deterministic. The same deck seed gives the same order every time, so Restart followed by the same number of runs reproduces a sweep exactly. If image five is the one you like, restart and queue five runs to get back to it, or note the draw number from the deck strip while the sweep runs.
Several shuffle tokens
You can use more than one:
{sgd:clothes:Kimono,Sundress,Trench_Coat}, {sgd:lighting:Golden_Hour_Sunset,Rim_Light}If you repeat the same token twice in one prompt, each occurrence draws a different style. Styles with an identical prompt and negative in two packs count as one card in the deck.
Mixing shuffle and random
Random tokens follow the node's seed input. Shuffle tokens follow the deck seed and position. The two don't affect each other, so you can combine them: a shuffle for the thing you're sweeping and a random for the thing you don't mind varying.
To keep the random picks still during a sweep, set the Style Grid node's seed control to fixed.
Which pack the deck draws from
The source dropdown in the panel limits the pool. With one pack selected, the deck only holds that pack's styles. With All Sources, it holds the merged library. Set it before you start a sweep.
Limits
A deck has up to 9,999 positions per seed. When you run out, press New deck.
A slice that matches no styles resolves to nothing, and the node shows a warning.
The same shuffle token in both the positive and the negative field resolves to the same style, so you don't need to add it to the negative. The picked style's negative is added automatically.
Saving a sweep as a preset
Shuffle chips are saved in presets. If you have a sweep you run often, such as your favorite ten lighting styles, save it once and apply it to any scene.
Related guides
More guides are on my profile.