SDXL Prompt Styler is a node that enables you to style prompts based on predefined templates stored in a JSON file.
SDXL 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.
The 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.
This section details the updates and new features committed over time, organized chronologically with the most recent changes at the top.
With 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:
sdxl_styles.json
to a safe location.sdxl_styles.json
into this new file.Template example from a JSON file:
[
{
"name": "base",
"prompt": "{prompt}",
"negative_prompt": ""
},
{
"name": "sai-enhance",
"prompt": "breathtaking {prompt} . award-winning, professional, highly detailed",
"negative_prompt": "ugly, deformed, noisy, blurry, distorted, grainy"
}
]
style = "sai-enhance"
text_positive = "a futuristic pop up tent in a forest"
text_negative = "dark"
The above will generate the following styled prompts:
text_positive_styled = "breathtaking a futuristic pop up tent in a forest . award-winning, professional, highly detailed"
text_negative_styled = "ugly, deformed, noisy, blurry, distorted, grainy, dark"
To install and use the SDXL Prompt Styler nodes, follow these steps:
ComfyUI/custom_nodes/
directory.git clone https://github.com/twri/sdxl_prompt_styler.git
This 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.