Nodes/Shima/Shima Styler (Iterator)
ComfyUI Node

Shima Styler (Iterator)

Batch-test every style in your library without touching the canvas

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Styler (Iterator)
  • clip
  • conditioning_positive
  • conditioning_negative
  • pos_clip_out
  • neg_clip_out
  • pos_str
  • neg_str
  • current_index
  • total_count
  • formatted_name
  • style_mode
base_prompt
style_modeArtists
index_modeincrement
index0
batch_size1
auto_queuefalse
connector,
style_strength1.00
base_string
negative_string
use_keywords_in_positive_promptfalse
use_optional_negatives_if_presentfalse
allow_external_linkingfalse
show_used_valuesfalse

Style testing used to be a grind: pick a style, run, look, pick the next, run again. Shima StyleIterator automates the whole loop. It walks through the style library one entry at a time - or auto-queues batch after batch until it's covered them all - re-encoding your base prompt with each style and handing you the index, total count, and a formatted name so you always know which style produced which output.

It's the Iterator of the Styler family: Selector picks one, Favorites is a shortlist, Gallery is visual browsing, and this one is the "run them all and compare later" workhorse. The two modes matter:

  • style_mode - Artists (uses the bundled artist library, hundreds of entries) or User Styles (your own entries from the stylesheet).
  • index_mode - increment, decrement, or randomize. Increment walks forward through the library; randomize hops around, which is nice for quick sampling when you don't want to watch every single style in order.

The inputs

  • base_prompt - what every style gets applied to. Keep it constant so differences in output are actually the style.
  • index - starting position in the list (default 0).
  • batch_size - how many runs per queue cycle (default 1).
  • auto_queue - the fun one. On, the node auto-queues the next style after each run completes, printing "Batch Complete" when it finishes the list. Off, it's a one-shot iterator.
  • connector, style_strength - same join and weighting controls as the rest of the family. Artist styles get "style of {name}" plus optional categories.
  • use_keywords_in_positive_prompt - appends the artist's category tags to the positive.
  • use_optional_negatives_if_present - pulls each style's optional negative tokens in.
  • clip, conditioning_positive, conditioning_negative, base_string/negative_string** - conditioning inputs; if you wire base_string it outranks the widget prompt.

Outputs: pos_clip_out, neg_clip_out, pos_str, neg_str, current_index, total_count, formatted_name, style_mode. The current_index and total_count pair is the one to feed a filename or an image comparer.

How it keeps running

Its IS_CHANGED returns NaN, the canonical "always rerun" trick - so it can't be accidentally cached out of existence. In auto-queue mode it keeps per-node counters in memory and pokes the server to queue the next run, wrapping the index around the list length.

Installing it

Part of KDB-USJP/shima_wf:

cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf

Restart ComfyUI. The artist library ships in the repo (read via openpyxl from the bundled XLSX); no downloads.

The honest advice

Auto-queue is powerful and mildly dangerous: leave it on with 900 artists and it will happily generate 900 images. Set a batch_size and stop it when you've got what you need. Also remember the list is positional - the same index maps to whatever artist occupies that slot, so keep the stylesheet frozen while comparing. The one output everyone forgets is formatted_name: wire it into a Save node's filename and "which style was this" stops being a guessing game. That single habit makes this node worth it.

CategoryShima/Styler

Inputs (17)

NameTypeDefaultDescription
base_promptSTRING
style_modeCOMBOArtists2 options: Artists, User Styles
index_modeCOMBOincrement3 options: increment, decrement, randomize
indexINT00–18446744073709550000
batch_sizeINT11–100
auto_queueBOOLEANfalse
connectorCOMBO, 4 options: and , mixed with , + , ,
style_strengthFLOAT1.00-10–10
clipoptCLIP
conditioning_positiveoptCONDITIONING
conditioning_negativeoptCONDITIONING
base_stringoptSTRING
negative_stringoptSTRING
use_keywords_in_positive_promptoptBOOLEANfalse
use_optional_negatives_if_presentoptBOOLEANfalse
allow_external_linkingoptBOOLEANfalse
show_used_valuesoptBOOLEANfalse

Outputs (8)

NameTypeDescription
pos_clip_outCONDITIONING
neg_clip_outCONDITIONING
pos_strSTRING
neg_strSTRING
current_indexINT
total_countINT
formatted_nameSTRING
style_modeSTRING