2026-01-31 13:11:30 +01:00
2026-01-31 13:11:30 +01:00
2026-01-31 13:11:30 +01:00
2026-01-31 13:11:30 +01:00
2026-01-31 13:11:30 +01:00
2026-01-30 17:27:10 +01:00
2026-01-31 13:11:30 +01:00
2026-01-31 13:11:30 +01:00
2026-01-31 13:11:30 +01:00
2026-01-31 13:11:30 +01:00

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

  1. Copy this folder to: ComfyUI/custom_nodes/ComfyUI_PromptStyler
  2. Restart ComfyUI.

Nodes

  • PromptStyler: Prompt -> Conditioning (Style Picker)
    • What it does: takes your prompt, applies exactly one style (prefix + suffix), and returns positive CONDITIONING.
    • Inputs:
      • prompt (STRING)
      • apply_style (BOOLEAN) - disable to pass your prompt through unchanged
      • style (single-select dropdown, sorted + categorized)
      • template_variant (dropdown) - default (comma-phrase templates) or flux_2_klein (prose guidance)
      • style_id_override (STRING) - optionally apply a style directly by id (useful for newly-added user styles)
      • text_encoder (CLIP) (wire this from your model loader node)
    • Outputs:
      • positive (CONDITIONING) -> connect to KSampler positive
      • styled_prompt (STRING) -> useful for debugging/seeing the final prompt

Typical Wiring

  1. CheckpointLoaderSimple -> take its CLIP output into PromptStyler text_encoder
  2. Your text prompt -> PromptStyler prompt
  3. PromptStyler positive -> KSampler positive

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
  • Each style entry contains:
    • id, name, category
    • default: { "prefix": "...", "suffix": "..." }
    • models.flux_2_klein: optional { "prefix": "", "suffix": "..." } prose guidance used by template_variant=flux_2_klein

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:

  1. Edit tools/generate_style_packs.py and regenerate packs (recommended if you want the same style structure everywhere).
  2. 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).

Interactive wizard (recommended):

C:\Comfyui\python_embeded\python.exe .\tools\add_styles.py wizard

The wizard writes styles under category: "User/<Subcategory>". After adding a style, copy the printed id into the node’s style_id_override to use it immediately (no reload required).

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
S
Description
No description provided
Readme Apache-2.0
784 KiB
Languages
Python 96.2%
HTML 3.8%