{"id":23233349,"url":"https://github.com/twri/sdxl_prompt_styler","last_synced_at":"2025-08-19T18:31:49.577Z","repository":{"id":183064389,"uuid":"669534386","full_name":"twri/sdxl_prompt_styler","owner":"twri","description":"Custom prompt styler node for SDXL in ComfyUI","archived":false,"fork":false,"pushed_at":"2024-03-24T18:55:24.000Z","size":3558,"stargazers_count":483,"open_issues_count":7,"forks_count":42,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-03-24T19:45:24.531Z","etag":null,"topics":["comfyui"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-07-22T15:36:59.000Z","updated_at":"2024-03-24T17:48:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f3c1e77-c742-4a43-9a22-a6247fa49fe7","html_url":"https://github.com/twri/sdxl_prompt_styler","commit_stats":null,"previous_names":["twri/sdxl_prompt_styler"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twri%2Fsdxl_prompt_styler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twri%2Fsdxl_prompt_styler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twri%2Fsdxl_prompt_styler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twri%2Fsdxl_prompt_styler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twri","download_url":"https://codeload.github.com/twri/sdxl_prompt_styler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230367780,"owners_count":18215325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comfyui"],"created_at":"2024-12-19T03:01:22.842Z","updated_at":"2024-12-19T03:01:46.297Z","avatar_url":"https://github.com/twri.png","language":"Python","funding_links":[],"categories":["Workflows (3395) sorted by GitHub Stars","All Workflows Sorted by GitHub Stars"],"sub_categories":[],"readme":"# SDXL Prompt Styler, a custom node for ComfyUI\n\n### SDXL Prompt Styler\n![SDXL Prompt Styler Screenshot](examples/sdxl_prompt_styler.png)\n\n### SDXL Prompt Styler Advanced\n![SDXL Prompt Styler Advanced Screenshot](examples/sdxl_prompt_styler_advanced.png)\n\nSDXL Prompt Styler is a node that enables you to style prompts based on predefined templates stored in multiple JSON files. The node specifically replaces a {prompt} placeholder in the 'prompt' field of each template with provided positive text.\n\nThe node also effectively manages negative prompts. If negative text is provided, the node combines this with the 'negative_prompt' field from the template. If no negative text is supplied, the system defaults to using the 'negative_prompt' from the JSON template. This flexibility enables the creation of a diverse and specific range of negative prompts.\n\n## Changelog\nThis section details the updates and new features committed over time, organized chronologically with the most recent changes at the top.\n\n### Commit date (2024-01-26)\n\n#### New Features\n\n* **SDXL Prompt Styler Advanced**: New option to copy the positive G prompt tokens to L, removing duplicates\n\n### Commit date (2024-01-19)\n\n#### New Features\n\n* **SDXL Prompt Styler**: Add toggles to disable styling for positive, negative, or both sentiments (bypass mode)\n\n### Commit date (2023-08-27)\n\n#### New Features\n\n* **SDXL Prompt Styler Advanced**: New node for more elaborate workflows with linguistic and supportive terms. Selector to change the split behavior of the negative prompt. Special thanks to @WinstonWoof and @Danamir for their contributions!\n* **SDXL Prompt Styler**: Minor changes to output names and printed log prompt.\n\n### Commit date (2023-08-11)\n\n#### Important Update\nWith the latest changes, the file structure and naming convention for style JSONs have been modified. If you've added or made changes to the `sdxl_styles.json` file in the past, follow these steps to ensure your styles remain intact:\n\n1. **Backup**: Before pulling the latest changes, back up your `sdxl_styles.json` to a safe location.\n2. **Migration**: After updating the repository, create a new JSON file in the styles directory. Move your custom styles from the backup of `sdxl_styles.json` into this new file.\n3. **Unique Style Names**: While the system now detects duplicates and appends a suffix to ensure uniqueness, it's a best practice to ensure your style names are originally unique to prevent any potential confusion.\n4. **Managing Included JSON Files**: If you prefer not to load specific included JSON files, consider renaming or moving them to a different location outside of the styles directory. The system will load all JSON files present in the specified directory.\n\n#### New Features\n\n* **Loading from Multiple JSON Files:** The system can now load styles from multiple JSON files present in the specified directory, ensuring the uniqueness of style names by appending a suffix to duplicates.\n* **Enhanced Error Handling:** Improved error handling for file reading, data validity, and template replacement functions.\n\n---\n\n### Usage Example with SDXL Prompt Styler\n\nTemplate example from a JSON file:\n\n```json\n[\n    {\n        \"name\": \"base\",\n        \"prompt\": \"{prompt}\",\n        \"negative_prompt\": \"\"\n    },\n    {\n        \"name\": \"sai-enhance\",\n        \"prompt\": \"breathtaking {prompt} . award-winning, professional, highly detailed\",\n        \"negative_prompt\": \"ugly, deformed, noisy, blurry, distorted, grainy\"\n    }\n]\n```\n\n```python\nstyle = \"sai-enhance\"\ntext_positive = \"a futuristic pop up tent in a forest\"\ntext_negative = \"dark\"\n```\n\nThe above will generate the following styled prompts:\n\n```python\ntext_positive_styled = \"breathtaking a futuristic pop up tent in a forest . award-winning, professional, highly detailed\"\ntext_negative_styled = \"ugly, deformed, noisy, blurry, distorted, grainy, dark\"\n```\n\n### Installation\n\nTo install and use the SDXL Prompt Styler nodes, follow these steps:\n\n1. Open a terminal or command line interface.\n2. Navigate to the `ComfyUI/custom_nodes/` directory.\n3. Run the following command:\n```git clone https://github.com/twri/sdxl_prompt_styler.git```\n4. Restart ComfyUI.\n\nThis command clones the SDXL Prompt Styler repository into your `ComfyUI/custom_nodes/` directory. You should now be able to access and use the nodes from this repository.\n\n### Inputs\n\n* **text_positive** - text for the positive base prompt\n* **text_negative** - text for the negative base prompt\n* **log_prompt** - print inputs and outputs to stdout\n\n### Outputs\n\n* **text_positive** - combined prompt with style for positive prompt\n* **text_negative** - combined prompt with style for negative prompt","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwri%2Fsdxl_prompt_styler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwri%2Fsdxl_prompt_styler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwri%2Fsdxl_prompt_styler/lists"}