ComfyUI > Nodes > comfyui-art-venture > SDXL Prompt Styler

ComfyUI Node: SDXL Prompt Styler

Class Name

SDXLPromptStyler

Category
utils
Author
sipherxyz (Account age: 1158days)
Extension
comfyui-art-venture
Latest Updated
2024-07-31
Github Stars
0.12K

How to Install comfyui-art-venture

Install this extension via the ComfyUI Manager by searching for comfyui-art-venture
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-art-venture in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

SDXL Prompt Styler Description

Enhance AI-generated art by styling positive and negative text prompts for consistent and visually appealing results.

SDXL Prompt Styler:

The SDXLPromptStyler node is designed to enhance your AI-generated art by allowing you to style your prompts effectively. This node takes your positive and negative text prompts and applies a specified style to them, ensuring that the generated art aligns with your desired aesthetic. It processes and combines the prompts using predefined templates, making it easier to achieve consistent and visually appealing results. Additionally, the node offers the option to log the prompts for review, providing transparency and control over the styling process. This tool is particularly useful for artists looking to fine-tune their AI-generated content with specific stylistic elements.

SDXL Prompt Styler Input Parameters:

text_positive

This parameter accepts a string input that represents the positive text prompt you want to style. The positive prompt is the main content that you wish to emphasize in your generated art. It supports multiline input, allowing you to provide detailed and complex prompts. The default value is an empty string.

text_negative

This parameter accepts a string input that represents the negative text prompt. The negative prompt is used to specify elements you want to avoid or minimize in your generated art. Like the positive prompt, it supports multiline input for detailed descriptions. The default value is an empty string.

style

This parameter allows you to select a style from a predefined list of styles. The selected style will be applied to your positive and negative prompts, influencing the overall aesthetic of the generated art. The available styles are dynamically loaded from the directory containing the style templates.

log_prompt

This parameter is a toggle that determines whether the prompts should be logged to the console. It accepts two options: "No" and "Yes". When set to "Yes", the node will print the style, positive and negative text, and the resulting prompts to the console for review. The default value is "No".

style_name (optional)

This optional parameter allows you to specify a style by name. If the provided style name is not found in the predefined styles, a warning will be issued, and the default style will be used instead. This parameter does not support multiline input.

SDXL Prompt Styler Output Parameters:

positive_prompt_text_g

This output parameter returns the styled positive prompt text. It combines the original positive prompt with the selected style template, resulting in a prompt that aligns with the desired aesthetic. This output is crucial for generating art that reflects the specified style.

negative_prompt_text_g

This output parameter returns the styled negative prompt text. It combines the original negative prompt with the selected style template's negative prompt, if available. This helps in minimizing or avoiding unwanted elements in the generated art, ensuring a more refined output.

SDXL Prompt Styler Usage Tips:

  • To achieve the best results, provide detailed and specific positive and negative prompts. This allows the node to apply the style more effectively.
  • Use the log_prompt parameter set to "Yes" during the initial stages to review how your prompts are being styled. This can help you fine-tune your inputs for better outcomes.
  • Experiment with different styles to see how they affect your prompts and the resulting art. This can provide you with a variety of aesthetic options to choose from.

SDXL Prompt Styler Common Errors and Solutions:

Warning: Style '<style_name>' not found. Using '<style>' instead.

  • Explanation: This warning occurs when the specified style_name is not found in the predefined styles.
  • Solution: Ensure that the style_name you provide matches one of the available styles. If unsure, check the list of styles loaded from the directory.

An error occurred: Invalid JSON data. Expected a list of templates.

  • Explanation: This error indicates that the JSON data containing the style templates is not formatted correctly.
  • Solution: Verify that the JSON file containing the style templates is a valid list of templates. Each template should have the required fields (name and prompt).

An error occurred: Invalid template. Missing 'name' or 'prompt' field.

  • Explanation: This error occurs when a template in the JSON data is missing the required name or prompt field.
  • Solution: Check the JSON file and ensure that each template includes both the name and prompt fields. Add any missing fields to the templates.

No template found with name '<template_name>'.

  • Explanation: This error indicates that no matching template was found for the specified template_name.
  • Solution: Ensure that the template_name you provide matches one of the templates in the JSON file. If necessary, add the missing template to the JSON file.

SDXL Prompt Styler Related Nodes

Go back to the extension to check out more related nodes.
comfyui-art-venture
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.