Skip to content
Node packVerifiedExternal
Open source

DemonAlone-StyleSelector-ComfyUI

Prompt Style Selector with Preview, Multiple Selecting, Search and Local Base for ComfyUI.

Maintainer@DemonAloneBgrade

Package profile

Status
Verified
Publisher
@DemonAlone
Source
GitHub
Stars
5

README

DemonAlone-StyleSelector-ComfyUI

🎨 Prompt Style Selector with Preview, Multiple Selecting, Search and Local Base for ComfyUI.

📖 About

This ComfyUI extension allows you to manage local style presets directly within the interface. It features a real-time preview, multi-select functionality, search capabilities, and integration with your local prompt base files.


🛠 How to Add Your Own Style

To use custom styles or databases, follow this new directory structure and configuration method:

1. Create Base Directory

Create a folder named after your database (e.g., MyStyleBase) inside the style_databases folder in your ComfyUI user directory (ComfyUI/custom_nodes/DemonAlone-StyleSelector-ComfyUI/....

Path Structure:

style_databases/
└── [YourBaseName]/
    ├── styles.json
    └── previews/
        ├── style_name_1.jpg
        └── style_name_2.png

2. Edit styles.json

The styles.json file must be placed directly inside your specific base folder. Add a record using the following JSON structure:

{
    "name": "The name of your style",
    "positive": "A positive for the style",
    "negative_prompt": "Negative for this style"
}

3. Add Preview Images

Images must be stored inside the previews subfolder of your base directory.

Supported formats: .png, .jpg, .jpeg, .webp Resolution: Dimensions and proportions do not matter. Suggested size: 256x256. Format JPG is recommended. Naming: The image filename must match the name field in styles.json exactly (case-sensitive). For example: Cyberpunk.jpg.

⚠️ File Naming Constraints

To ensure compatibility across all operating systems (Windows, macOS, Linux), please adhere to the following rules when naming styles and preview images:

  • Allowed Characters: Use only standard alphanumeric characters (a-z, A-Z, 0-9) and basic symbols like underscores (_) or hyphens (-).
  • Forbidden Symbols: Avoid special characters such as forward slashes (/), backslashes (\), colons (:), asterisks (*), question marks (?), and quotation marks. These may cause errors depending on your file system.
  • Matching Names: Ensure that the name field in styles.json exactly matches the preview image filename (case-sensitive).

Recommended Naming Format:

Example: Cyberpunk_Street.jpg or Cyberpunk-Street.png Avoid: Cyberpunk/Street.jpg or Cyberpunk:City.jpg

4. Load and Refresh Changes

After editing styles.json or adding new images, you need to refresh the node:

  • Update List & Previews: Press the "Refresh style list" button inside the ComfyUI interface. This will update both the dropdown menu and the preview images instantly.
  • New Base (First Time): When creating a brand new base for the very first time, press "Refresh style list", then perform a full page reload (F5 or Ctrl+R) to ensure the new base appears in the ComfyUI dropdown menu.

⚠️ Cleanup & Behavior Notes

  • Deleting Previews: If you delete an image from the previews folder, the style will remain in the node's "Selected" area. To remove it from the selection list entirely, you must press the "Clear selected style" button.

🚧 Troubleshooting

If your image does not show a tooltip with prompts, or if you see an error message in the console:

DA_StyleSelector: Style 'YOUR STYLE NAME' not found in styles.json
  • Ensure capitalization matches exactly (e.g., Cyberpunk vs cyberpunk).
  • Verify the JSON syntax is correct and valid.

Page Reload Behavior

While simple refresh works for most updates, remember that the initial registration of a new database folder may require a browser reload after pressing "Refresh style list".

🏛 Credits & Acknowledgments

This extension is built upon existing open-source projects:

Image Gallery Loader logic based on [ComfyUi-ImageGalleryLoader](https://github.com/B

Nodes in this pack

1 node
  • DA_StyleSelector

Related resources

13 connections
Used byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v5.4Used byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v3.3Latent =>1.0 LatentUsed byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v4.1Used byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v5.2 OutpaintUsed byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v1.3 LatentUsed byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — 🚩v2.5 LatentUsed byZ-image turbo TXT2IMG, IMG2IMG, inpaint, outpaint, onlymasked inpaint, controlnet, lora manager, caption, adetailer, SeedVR2. — v6.0Used byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v5.7 Native SeedVR2Used byKrea2 Turbo, T2I, I2I, adetailer, prompt styles, civitai metadata, caption — v1.4 Native SeedVR2Used byZ-image turbo TXT2IMG, IMG2IMG, inpaint, outpaint, onlymasked inpaint, controlnet, lora manager, caption, adetailer, SeedVR2. — v4.4Used byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v2.9Used byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v4.5 inpaint fixUsed byFlux2 Klein 9b/4b simple workflow (TXT2IMG, IMG2IMG, Edit, Inpaint, Outpaint, metadata export for Civitai, SeedVR2) — v3.3 Manual inpaint

Sources

3 sources
GitHubSourceVersion 5efd82dd96608656f55ce4c434b7655146b3bb73
github.com/DemonAlone/DemonAlone-StyleSelector-ComfyUI

Verified Oct 20

Source excerpts

1 excerpt

Source context: Repo DemonAlone/DemonAlone-StyleSelector-ComfyUI