🎨 SDPrompt:
The SDPromptNode is a specialized component within the ComfyUI framework designed to facilitate the retrieval and utilization of prompts from a dataset stored in a Parquet file. This node is particularly useful for AI artists who wish to incorporate pre-existing prompts into their creative workflows, allowing for a seamless integration of structured data into the artistic process. The node provides the capability to filter prompts based on specific criteria, such as NSFW (Not Safe For Work) content, ensuring that the retrieved prompts align with the user's requirements. Additionally, the node supports both random and sequential access to prompts, offering flexibility in how prompts are selected and used. By leveraging this node, you can enhance your creative projects with a diverse range of prompts, thereby expanding the scope and depth of your artistic expressions.
🎨 SDPrompt Input Parameters:
mode
The mode parameter determines how prompts are selected from the dataset. It can be set to either "random" or a specific number, which influences whether a prompt is chosen randomly or sequentially. This parameter is crucial for controlling the variability and predictability of the prompts used in your workflow.
number
The number parameter specifies the index of the prompt to retrieve when the mode is not set to "random". It allows you to access a specific prompt from the dataset, providing precise control over the prompt selection process. The value must be within the range of available prompts.
filter
The filter parameter is used to apply content-based filtering to the prompts. It can be set to "nsfw" to retrieve prompts with potentially sensitive content or "sfw" for safe-for-work content. This parameter ensures that the prompts align with your content guidelines and preferences.
unique_id
The unique_id parameter is an optional identifier used to associate the retrieved prompt with a specific node in a workflow. It is particularly useful when integrating prompts into complex workflows where tracking and identification are necessary.
extra_pnginfo
The extra_pnginfo parameter is an optional list that can contain additional metadata about the workflow. When provided, it allows the node to update the workflow with the retrieved prompt, ensuring that the prompt is correctly integrated and utilized within the broader context of the project.
🎨 SDPrompt Output Parameters:
ui
The ui output parameter provides a dictionary containing the retrieved prompt as a text entry. This output is essential for displaying the prompt within the user interface, allowing you to review and utilize the prompt in your creative process.
result
The result output parameter returns a tuple containing the retrieved prompt. This output is crucial for further processing and integration within your workflow, enabling you to seamlessly incorporate the prompt into your artistic endeavors.
🎨 SDPrompt Usage Tips:
- To ensure a diverse range of prompts, use the "random" mode, which can introduce variability and inspiration into your creative process.
- When working with specific themes or content guidelines, utilize the
filterparameter to retrieve prompts that align with your project's requirements. - For complex workflows, make use of the
unique_idandextra_pnginfoparameters to maintain organization and ensure that prompts are correctly integrated into your project.
🎨 SDPrompt Common Errors and Solutions:
No prompts match the filter.
- Explanation: This error occurs when the filter criteria do not match any prompts in the dataset.
- Solution: Adjust the
filterparameter to broaden the criteria or verify that the dataset contains prompts that meet the specified filter.
Number exceeds matching prompts.
- Explanation: This error arises when the specified
numberparameter is greater than the available prompts that match the filter criteria. - Solution: Reduce the
numberparameter to a value within the range of available prompts or adjust the filter to increase the pool of matching prompts.
Node not found. The custom node may not be installed.
- Explanation: This error indicates that the node class type is missing or not recognized, possibly due to a missing installation.
- Solution: Ensure that the SDPromptNode is correctly installed and available in the NODE_CLASS_MAPPINGS. Reinstall or update the node if necessary.
