SDXL Prompt Styler Advanced (Preview)
See What an SDXL Style Actually Does Before You Commit
- text_positive_g
- text_positive_l
- text_positive
- text_negative_g
- text_negative_l
- text_negative
You're staring at a dropdown with 107 styles named like artstyle-art deco and misc-zentangle. You pick one, wait thirty seconds, and find out it turned your portrait into a travel poster. This node is the fix for that: it's the well-traveled sdxl_prompt_styler, but every style in the menu comes with a hover thumbnail, generated with SDXL 1.0, so you can see the flavor before you pay for a generation. It also groups the 107 styles into a category submenu - ads, artstyle, photo, game, papercraft - instead of one flat wall of text.
How it works
The "Preview" suffix is doing honest work here. This isn't a new styler. The Python class subclasses twri's SDXLPromptStylerAdvanced and bolts preview image paths onto the style enum; the styling logic itself is unchanged. Pick a style and the node swaps {prompt} into that style's template, then prepends the template's own negative prompt to yours. That's the whole mechanism - plain string substitution, no model, no API call, no weights to download.
The clever part is the front-end. The 107 thumbnails ship inside the repo, and the pack registers a /preview route on ComfyUI's own server to serve them. A small JS extension (forked from pythongosssss's ComfyUI-Custom-Scripts, which you'll recognize if you've seen his LoRA picker) patches the combo widget to build the submenu and show a 384px hover preview. All of it is loaded automatically on modern ComfyUI via the pack's web directory.
Inputs that matter
The two you'll actually set are text_positive_g and text_positive_l. SDXL conditions on two text encoders - OpenCLIP-G and CLIP-L - and this node lets you feed them different text. Styles whose template contains a . split right there: the part before goes to G, the part after to L.
text_positive_g/text_positive_l- your prompt, split across the two encoders. If you don't care about the distinction, put everything in G and flip oncopy_to_l.negative_prompt_to- where the negative lands:Both,G only, orL only. Defaults toBoth, which is right until you're specifically tuning one encoder.copy_to_l- copies G's positive into L (deduped), handy when you want both encoders on the same text.
log_prompt defaults to off here - the plain node defaults it on, which is an inconsistency worth knowing if you swap between them.
Outputs
Six strings: text_positive_g, text_positive_l, text_positive (the two joined with .), and text_negative_g, text_negative_l, text_negative. The split pair maps directly onto a CLIPTextEncodeSDXL node's text_g / text_l inputs; the combined ones drop into a standard CLIP Text Encode if you want the simpler path.
Install
ComfyUI Manager, search ComfyUI-Prompt-Preview, or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/Chan-0312/ComfyUI-Prompt-Preview
Then restart ComfyUI. There's no requirements.txt and no model download - the preview PNGs are already in the repo. As custom node installs go, this one is about as clean as it gets.
Gotchas
The thumbnails were generated with SDXL 1.0 on one fixed sample prompt, so they show a style's general flavor, not your image. A pretty preview can still fight your subject. Also keep in mind this styling is literal string replacement - long prompts plus long style templates get unwieldy fast, and each style's built-in negative (things like noisy, blurry) gets bolted onto yours. If a preview ever goes missing, the pack prints a warning to your console and the menu item just has no image - currently all 107 have one.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| text_positive_g | STRING | — | |
| text_positive_l | STRING | — | |
| text_negative | STRING | — | |
| style | COMBO | 107 options: [object Object], [object Object], [object Object], [object Object], [object Object], [object Object], +101 | |
| negative_prompt_to | COMBO | Both | 3 options: Both, G only, L only |
| copy_to_l | BOOLEAN | false | — |
| log_prompt | BOOLEAN | false | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| text_positive_g | STRING | — |
| text_positive_l | STRING | — |
| text_positive | STRING | — |
| text_negative_g | STRING | — |
| text_negative_l | STRING | — |
| text_negative | STRING | — |