Style Prompt From Config
Your style presets live in a JSON file you can edit
- positive_prompt
- negative_prompt
If you've ever maintained a style preset - a fixed chunk of prompt text that turns "a cat" into "a cat, digital media, lineart, monochrome, high contrast" - you've probably kept it in a text file or a Set Text node. This node turns that habit into a config-driven system: it reads style templates from a sage_styles.json file, lets you pick a model and style from dropdowns, and builds the positive and negative prompts for you by inserting your input into the template.
How it works
The node loads style definitions from sage_styles.json, which ships with the pack and lives under the Sage user folder (comfyui/user/default/SageUtils/). The shipped file covers a few dozen styles across Pony v6, SAI, and SeaArt - things like "Digital Drawing", "Lineart", and "Marker Drawing". Each entry has a model, a style name, a positive template, and a negative template.
The model dropdown is a dynamic combo: pick a model and a second style dropdown appears populated with that model's styles. Then there are two text inputs, positive and negative - your actual prompt content. The template substitution works like this: if the style template contains the literal {prompt} token, your input is inserted right there; if it doesn't, your input is appended with a ", " separator. Outputs are positive_prompt and negative_prompt, ready to feed into a CLIP text encode or a metadata node.
The part that makes it worth it
You edit the JSON. The whole point of "From Config" is that your style library is data, not node wiring - add a style, tweak a negative, and every workflow that uses the node picks it up on the next run. No dragging a new node in, no hunting for where the preset was defined. If you're the kind of person who maintains a personal style sheet across models, that's a genuine workflow upgrade over hardcoding prompts in nodes.
Installing it
Sage Utils via ComfyUI Manager (search Sage Utils) or:
cd ComfyUI/custom_nodes
git clone https://github.com/arcum42/ComfyUI_SageUtils
cd ComfyUI_SageUtils
pip install -r requirements.txt
Restart ComfyUI. Only pip dependency is dynamicprompts; no model downloads for the node itself.
The honest gotchas
Your {prompt} token has to match exactly - {prompt} with no spaces - or the node silently switches to append mode and you get "template, your text" instead of your text inside the template. And while editing the JSON is powerful, a malformed file means the node's dropdowns come up empty (the code handles a missing or non-list config by showing a "No models" fallback), so keep a backup of the shipped file before you reformat it. Also worth knowing: this is plain string substitution, not wildcard processing - the templates are applied literally, which is what you want for style presets anyway.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | Input value for model. | |
| positive | STRING | User positive prompt text to insert into the style template (or append if no {prompt} token exists). | |
| negative | STRING | User negative prompt text to insert into the style template (or append if no {prompt} token exists). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive_prompt | STRING | The generated positive prompt string. |
| negative_prompt | STRING | The generated negative prompt string. |