ComfyUI  >  Nodes  >  SDXL Prompt Styler

ComfyUI Extension: SDXL Prompt Styler

Repo Name

sdxl_prompt_styler

Author
twri (Account age: 4077 days)
Nodes
View all nodes (2)
Latest Updated
5/22/2024
Github Stars
0.7K

How to Install SDXL Prompt Styler

Install this extension via the ComfyUI Manager by searching for  SDXL Prompt Styler
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter SDXL Prompt Styler 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

SDXL Prompt Styler is a node that styles prompts using predefined templates from a JSON file, enhancing prompt customization and consistency.

SDXL Prompt Styler Introduction

The sdxl_prompt_styler is a powerful extension designed for AI artists using ComfyUI. This extension allows you to style your prompts based on predefined templates stored in multiple JSON files. By using this tool, you can easily enhance your prompts with specific styles, making your AI-generated art more detailed and professional.

Key Features:

  • Template-Based Styling: Replace a {prompt} placeholder in the template with your provided positive text.
  • Negative Prompt Management: Combine your negative text with the template's negative_prompt field or use the default from the template.
  • Flexibility: Create a diverse range of prompts by mixing and matching positive and negative text with different templates. This extension is particularly useful for AI artists who want to streamline their workflow and produce high-quality, stylistically consistent outputs without manually crafting each prompt.

How SDXL Prompt Styler Works

The sdxl_prompt_styler operates by using templates defined in JSON files. Each template contains a prompt field with a {prompt} placeholder and an optional negative_prompt field. When you input your positive and negative text, the extension replaces the {prompt} placeholder with your positive text and combines the negative text with the template's negative_prompt.

Example:

  1. Template in JSON:
{
  "name": "sai-enhance",
  "prompt": "breathtaking {prompt} . award-winning, professional, highly detailed",
  "negative_prompt": "ugly, deformed, noisy, blurry, distorted, grainy"
}
  1. Your Input:
  • Positive Text: "a futuristic pop up tent in a forest"
  • Negative Text: "dark"
  1. Output:
  • Positive Styled Prompt: "breathtaking a futuristic pop up tent in a forest . award-winning, professional, highly detailed"
  • Negative Styled Prompt: "ugly, deformed, noisy, blurry, distorted, grainy, dark" This process allows you to quickly generate complex and nuanced prompts that can significantly enhance the quality of your AI-generated art.

SDXL Prompt Styler Features

Basic Features:

  • Positive Prompt Styling: Replace {prompt} in the template with your positive text.
  • Negative Prompt Styling: Combine your negative text with the template's negative_prompt.

Advanced Features:

  • Bypass Mode: Toggle to disable styling for positive, negative, or both prompts.
  • Copy Positive G Prompt Tokens to L: In the advanced version, you can copy positive G prompt tokens to L, removing duplicates for more refined control.

Customization:

  • Multiple JSON Files: Load styles from multiple JSON files, ensuring unique style names by appending suffixes to duplicates.
  • Error Handling: Enhanced error handling for file reading, data validity, and template replacement functions.

SDXL Prompt Styler Models

The extension includes different models to cater to various needs:

Basic Model:

  • SDXL Prompt Styler: Ideal for straightforward prompt styling with basic positive and negative text management.

Advanced Model:

  • SDXL Prompt Styler Advanced: Suitable for more elaborate workflows, offering additional features like linguistic and supportive terms, and advanced negative prompt splitting.

What's New with SDXL Prompt Styler

Recent Updates:

  • 2024-01-26:
  • New Feature: Option to copy positive G prompt tokens to L, removing duplicates.
  • 2024-01-19:
  • New Feature: Added toggles to disable styling for positive, negative, or both sentiments (bypass mode).
  • 2023-08-27:
  • New Feature: Advanced node for more elaborate workflows with linguistic and supportive terms.
  • Update: Minor changes to output names and printed log prompt.
  • 2023-08-11:
  • Important Update: Modified file structure and naming convention for style JSONs. Ensure to back up and migrate your custom styles.

Troubleshooting SDXL Prompt Styler

Common Issues and Solutions:

  1. Styles Not Loading:
  • Solution: Ensure your JSON files are correctly formatted and placed in the specified directory.
  1. Duplicate Style Names:
  • Solution: The system appends a suffix to duplicates, but it's best to use unique names.
  1. Error Messages:
  • Solution: Check the error logs for details and ensure your JSON files are valid.

FAQs:

  • Q: How do I add a new style?
  • A: Create a new JSON file in the styles directory and define your template.
  • Q: Can I disable styling for specific prompts?
  • A: Yes, use the bypass mode to disable styling for positive, negative, or both prompts.

Learn More about SDXL Prompt Styler

For additional resources, tutorials, and community support, visit the following links:

  • ComfyUI Documentation
  • Community Forums
  • Tutorials and Guides
    These resources will help you get the most out of the sdxl_prompt_styler and connect with other AI artists for tips and support.

SDXL Prompt Styler Related Nodes

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.