ComfyUI > Nodes > ComfyUI-Addoor > 🌻 CSV Prompt Styler

ComfyUI Node: 🌻 CSV Prompt Styler

Class Name

AD_CSVPromptStyler

Category
🌻 Addoor/CSV
Author
ADDOOR (Account age: 2884days)
Extension
ComfyUI-Addoor
Latest Updated
2025-01-24
Github Stars
0.03K

How to Install ComfyUI-Addoor

Install this extension via the ComfyUI Manager by searching for ComfyUI-Addoor
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Addoor 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

🌻 CSV Prompt Styler Description

Enhance text prompts with predefined styles from CSV for dynamic styling in AI art generation.

🌻 CSV Prompt Styler:

The AD_CSVPromptStyler is a versatile node designed to enhance your text prompts by applying predefined styles from a CSV file. This node allows you to dynamically style both positive and negative text prompts, which can be particularly useful in AI art generation where the tone and context of prompts significantly influence the output. By leveraging a CSV file containing various styles, you can easily switch between different stylistic expressions, ensuring that your prompts are tailored to your creative needs. The node reads the CSV file to extract style information, which includes both positive and negative prompt templates. It then applies the selected style to your input text, allowing for a seamless integration of stylistic elements into your prompts. This functionality is especially beneficial for artists looking to experiment with different styles or maintain consistency across multiple projects.

🌻 CSV Prompt Styler Input Parameters:

csv_path

The csv_path parameter specifies the file path to the CSV file containing the style definitions. This file should include a list of styles, each with associated positive and negative prompt templates. The default value is set to "./custom_nodes/ComfyUI-Addoor/styles.csv", but you can provide a different path if you have a custom CSV file. Changing this path will reload the styles and style data, allowing you to work with different sets of styles.

text_positive

The text_positive parameter is where you input the positive text prompt that you want to style. This text will be integrated into the selected style's positive prompt template. The default value is an empty string, and it supports multiline input, giving you the flexibility to craft detailed and complex prompts.

text_negative

The text_negative parameter allows you to input the negative text prompt, which will be styled according to the selected style's negative prompt template. Like text_positive, it defaults to an empty string and supports multiline input. This parameter is crucial for refining the context and tone of your prompts by specifying what should be avoided or minimized in the output.

style

The style parameter lets you choose from the available styles defined in the CSV file. The node automatically loads these styles, and you can select one to apply to your prompts. If a style is not found, the node defaults to "None", which applies no additional styling. This parameter is essential for determining the stylistic direction of your prompts.

log_prompt

The log_prompt parameter is a boolean that controls whether the node logs the details of the styling process. When set to True, it prints the selected style, original prompts, and styled prompts, providing transparency and aiding in debugging. The default value is True, ensuring that you have access to this information unless you choose to disable it.

🌻 CSV Prompt Styler Output Parameters:

styled_positive

The styled_positive output is the result of applying the selected style's positive prompt template to your input text_positive. This output reflects the integration of your original text with the stylistic elements defined in the CSV file, providing a refined and contextually enhanced prompt.

styled_negative

The styled_negative output is the styled version of your input text_negative, combined with the negative prompt template from the selected style. This output helps in shaping the constraints and limitations of your prompt, ensuring that the generated content aligns with your creative intentions.

selected_style

The selected_style output indicates the style that was applied to your prompts. This output is useful for tracking which style was used, especially when experimenting with multiple styles or when the default "None" style is applied due to an unrecognized style name.

🌻 CSV Prompt Styler Usage Tips:

  • Ensure your CSV file is correctly formatted with style names and corresponding prompt templates to avoid errors and maximize the node's functionality.
  • Use the log_prompt feature to verify that the correct styles are being applied and to troubleshoot any issues with prompt styling.
  • Experiment with different styles to discover new creative directions and maintain a library of styles for various projects.

🌻 CSV Prompt Styler Common Errors and Solutions:

Error: File not found at <csv_path>

  • Explanation: This error occurs when the specified CSV file path does not exist or is incorrect.
  • Solution: Verify the file path and ensure the CSV file is located at the specified location. Update the csv_path parameter if necessary.

Style '<style>' not found. Using default.

  • Explanation: This message indicates that the specified style is not present in the CSV file, and the node is defaulting to the "None" style.
  • Solution: Check the CSV file to ensure the style name is correctly listed. If the style is missing, add it to the CSV file or select an available style.

🌻 CSV Prompt Styler Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Addoor
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.