🪄 Style Selector (OreX):
OrexStyleSelector applies selected styles to prompts so you can prepare text for image generation without manually rewriting each variation. It reads the selected style entries, combines their prompt text with any text you provide, and can either merge several styles into one result or produce a separate result for each style. It also carries over style-specific negative prompt text and derives a filename label from a style’s thumbnail when one is available. This makes it useful for trying several looks while keeping your original prompt consistent.
🪄 Style Selector (OreX) Input Parameters:
styles
Selects the style collection used when resolving your selections. The options are the names of .json files found in the node’s styles directory, with the extension removed; if none are found, the only displayed option is my_styles. The default is the first option found. There is no numeric minimum or maximum. Selecting a collection does not, by itself, apply every style in it: the node uses your selection in select_styles to determine which entries to apply.
batch_mode
Controls whether selected styles are combined or processed separately. The options are Batch OFF (False, the default) and Batch ON (True); there is no numeric range. With batch mode off, the node combines the selected styles into one set of prompt strings and joins available thumbnail-derived names into one filename label. With batch mode on, it produces one corresponding set of strings per resolved style, which is useful when you want to compare styles independently. If no styles resolve, either mode returns a single fallback result.
select_styles
Holds the style selection that the node attempts to resolve against style collections. It is a string with an empty-string default; no minimum or maximum length is specified in the interface. Only styles that resolve to entries in the style data affect the result. The supplied context does not include the selection parser or its expected text format, so use the node’s selection control or the format supplied by its companion interface rather than assuming that typing a style name alone will select it. An empty or unresolved selection produces a fallback result using your supplied prompt text.
preview_scale
Sets a preview-scale value from 0.5 to 2.0, in steps of 0.01; the default is 1.0. This setting is present in the node interface, but the supplied execution code does not use it when building prompts or filename labels. Changing it therefore does not change the returned strings. The supplied code does not establish what, if anything, it changes in a separate preview interface.
positive
Provides your base positive prompt as an optional connected string input. No interface default or numeric range is specified; when it is not supplied, execution uses an empty string, and a None value is treated as empty. If a selected style’s prompt contains {prompt}, the node substitutes your text at that position. Otherwise, it places your text before the style prompt when there is one. If no style resolves, your text is returned as the positive prompt, or as a single space when it is empty.
negative
Provides your base negative prompt as an optional connected string input. No interface default or numeric range is specified; when it is not supplied, execution uses an empty string, and a None value is treated as empty. The node appends each applicable style’s negative prompt after your text, separated by a comma and space when both are present. If no style resolves, your text is returned unchanged unless it is empty, in which case the result is a single space.
🪄 Style Selector (OreX) Output Parameters:
positive
A string-list output containing the resulting positive prompt text. With batch mode off, the list has one item combining the resolved styles and your base prompt. With batch mode on, it has one item per resolved style, allowing each styling choice to be used separately. If nothing resolves, it has one item containing your base prompt. When the resulting text is empty or only whitespace, the node returns a single space rather than an empty string.
negative
A string-list output containing the resulting negative prompt text, aligned with the positive items. Your base negative text is included, followed by applicable negative text from the selected style or styles. With batch mode off, all resolved styles contribute to one item; with batch mode on, each item corresponds to one style. An empty or whitespace-only result is represented by a single space.
file_name
A string-list output containing labels derived from selected styles’ thumbnail filenames, without their directory paths or file extensions. It is not a saved file path and does not save an image. With batch mode off, available labels are joined with underscores into one item. With batch mode on, each resolved style has a corresponding item. A style without a usable thumbnail filename, or a selection that resolves no styles, produces a single space in the relevant position.
🪄 Style Selector (OreX) Usage Tips:
- Use
Batch OFFwhen you want one prompt that combines several selected looks. UseBatch ONwhen you want separate prompt results to compare those looks individually. - Connect a base
positiveprompt when you want the same subject or scene carried across styles. A style containing{prompt}controls where that text appears; otherwise, the node places your text before the style text. - Connect a base
negativeprompt for exclusions you want to retain across styles. Check the resulting text when combining multiple styles, since each selected style can add its own negative wording. - Confirm that your selections resolve before judging a style’s effect. If the output contains only your base prompt and
file_nameis a single space, no style content was applied. - Treat
file_nameas a label for downstream use, not confirmation that an image was saved. If you need a meaningful label, the selected style must have a usablethumbnailvalue.
🪄 Style Selector (OreX) Common Errors and Solutions:
No style appears to have been applied
- Explanation: The node does not report a dedicated error when no selection resolves. It returns your base prompts, or single spaces when those prompts are empty, and
file_namebecomes a single space. - Solution: Check that you selected the intended style collection and made a valid selection in
select_stylesusing the format supported by the node’s interface. Also check that the selected style exists in its collection.
Style collection cannot be read or contains invalid JSON
- Explanation: When loading a selected style collection raises an
OSErrororJSONDecodeError, the provided resolver treats that collection as empty. The visible symptom can therefore be an unchanged base prompt rather than an error message. - Solution: Check that the style file exists, is readable, and contains valid JSON, then try the selection again.
Output is a single space
- Explanation: The node deliberately uses
" "in place of an empty positive prompt, negative prompt, or filename label. This can happen when no text or usable thumbnail name is available; it does not necessarily indicate a crash. - Solution: Supply base prompt text or select a style with the relevant prompt fields. For a filename label, check the style’s
thumbnailvalue.
Batch mode returns one result instead of several
- Explanation:
Batch ONreturns one result per resolved style, not per style listed in the collection. When none resolve, it returns one fallback result. - Solution: Verify each intended selection and confirm that its style entry is available. Then inspect the three output lists, whose items correspond by position.
file_name is blank for a selected style
- Explanation: The label comes from the selected style’s
thumbnailvalue. If that field is missing, empty, or does not yield a filename without an extension, the node uses a single space for that style. - Solution: Check the style entry’s thumbnail value. Do not use
file_nameas evidence that an output image has been created.
Changing preview_scale does not change the prompt
- Explanation: The provided execution code accepts
preview_scalebut does not use it to form any of the three outputs. - Solution: Use
styles,select_styles,batch_mode, or the connected prompt text to change the returned strings. Do not rely onpreview_scaleto alter prompt content.
TypeError while processing a style prompt
- Explanation: The execution code treats a style’s
promptvalue as text when it checks for and replaces{prompt}. A non-text value in that field can cause a type-related error; the exact message depends on the value and where processing stops. - Solution: Check the selected style’s JSON entry and make
prompta text string. Checknegative_promptas well if the error occurs while combining negative text.
