v0.1.0
ComfyUI PromptStyler
Custom ComfyUI node that applies curated style prefix/suffix templates to your positive prompt and outputs CONDITIONING for KSampler.
Versioning / Releases
- Version:
VERSION(also mirrored as__version__in__init__.py). - Changelog:
CHANGELOG.md. - Releases: automated via Release Please (
.github/workflows/release-please.yml).
Install
- Copy this folder to:
ComfyUI/custom_nodes/ComfyUI_PromptStyler - Restart ComfyUI.
Nodes
PromptStyler: Prompt -> Conditioning (Style Picker)- What it does: takes your
prompt, applies exactly one style (prefix + suffix), and returnspositiveCONDITIONING. - Inputs:
prompt(STRING)apply_style(BOOLEAN) - disable to pass your prompt through unchangedstyle(single-select dropdown, sorted + categorized)text_encoder(CLIP) (wire this from your model loader node)
- Outputs:
positive(CONDITIONING) -> connect to KSamplerpositivestyled_prompt(STRING) -> useful for debugging/seeing the final prompt
- What it does: takes your
Typical Wiring
CheckpointLoaderSimple-> take itsCLIPoutput intoPromptStylertext_encoder- Your text prompt ->
PromptStylerprompt PromptStylerpositive->KSamplerpositive
Style Data
- Styles live in JSON packs under
styles/packs/*.json(merged in filename order). - The dropdown is formatted as:
Category | Name | id- Example:
Anime/Manga | Anime Style | anime_style
- Example:
- Each style entry contains:
id,name,categorydefault:{ "prefix": "...", "suffix": "..." }
Validate
Run with your embedded python:
C:\Comfyui\python_embeded\python.exe .\tools\validate_styles.py
Regenerate Style Packs
The library is generated into styles/packs/*.json:
C:\Comfyui\python_embeded\python.exe .\tools\generate_style_packs.py
After regenerating, restart ComfyUI (or "Reload custom nodes") to refresh the style dropdown.
Add Your Own Styles
Two options:
- Edit
tools/generate_style_packs.pyand regenerate packs (recommended if you want the same style structure everywhere). - Add a new JSON file under
styles/packs/that follows the same schema ({"version": 1, "styles": [...]}).
Add Styles (Automated)
Use tools/add_styles.py to append styles into a custom pack (default: styles/packs/99_user_custom.json).
List categories:
C:\Comfyui\python_embeded\python.exe .\tools\add_styles.py categories
Add one style:
C:\Comfyui\python_embeded\python.exe .\tools\add_styles.py add --name "Ink Noir (Modern)" --category "Fine Art" --core "ink wash, chiaroscuro, high contrast" --details "paper texture, soft bleed, dramatic mood" --tags "ink,noir"
Bulk add from CSV (columns: name,category,core,details,tags):
C:\Comfyui\python_embeded\python.exe .\tools\add_styles.py bulk --csv .\tools\new_styles.csv
Languages
Python
96.2%
HTML
3.8%