Visit ComfyUI Online for ready-to-use ComfyUI environment
Enhance text prompts with predefined styles from CSV for dynamic styling in AI art generation.
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.
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.
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.
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.
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.
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.
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.
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.
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.
log_prompt
feature to verify that the correct styles are being applied and to troubleshoot any issues with prompt styling.<csv_path>
csv_path
parameter if necessary.<style>
' not found. Using default.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.