ComfyUI > Nodes > COMFYUI_PROMPTMODELS > πŸ” Text Prompt Blocker (Preview)

ComfyUI Node: πŸ” Text Prompt Blocker (Preview)

Class Name

TextPromptBlockerPreview

Category
Text/Security
Author
cdanielp (Account age: 0days)
Extension
COMFYUI_PROMPTMODELS
Latest Updated
2026-03-17
Github Stars
0.02K

How to Install COMFYUI_PROMPTMODELS

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

πŸ” Text Prompt Blocker (Preview) Description

Analyzes text prompts for flagged content, aiding in testing and refining moderation settings.

πŸ” Text Prompt Blocker (Preview):

The TextPromptBlockerPreview node is designed to provide a non-intrusive way to analyze text prompts for potentially prohibited content without actually blocking them. This node is particularly useful for testing and debugging purposes, allowing you to see which words or phrases would be flagged by the TextPromptBlocker without interrupting your workflow. By using this preview version, you can gain insights into the effectiveness of your blocked words list and make necessary adjustments to ensure that your content moderation settings are both comprehensive and appropriate for your needs. The node's primary function is to scan the input text for any occurrences of specified blocked words or their variations, providing a report on what would be detected, thus helping you maintain a secure and compliant environment.

πŸ” Text Prompt Blocker (Preview) Input Parameters:

prompt

The prompt parameter is a string input where you enter the text that you want to analyze for prohibited content. This parameter supports multiline input, allowing you to test longer pieces of text or multiple lines at once. The default value is an empty string, and there are no specific minimum or maximum length restrictions, but it should be a valid string.

blocked_words

The blocked_words parameter is a string that contains a comma-separated list of words or phrases that you want to flag as prohibited. This list can be customized to suit your specific content moderation needs. The default list includes words like "child," "kid," "baby," and others that might be sensitive in certain contexts. This parameter also supports multiline input for ease of editing.

case_sensitive

The case_sensitive parameter is a boolean option that determines whether the word detection should be case-sensitive. By default, it is set to False, meaning that the detection will ignore case differences, making it more comprehensive in identifying prohibited content.

hard_block

The hard_block parameter is a boolean option that, in the context of the preview node, does not affect the output since the node does not block content. However, it is included to maintain consistency with the TextPromptBlocker node. The default value is True.

detect_contained

The detect_contained parameter is a boolean option that specifies whether the node should detect blocked words that are contained within other words. For example, if set to True, the word "child" would be detected in "childhood." The default value is True, allowing for more thorough detection.

expand_variations

The expand_variations parameter is a boolean option that, when enabled, allows the node to automatically expand the blocked words list to include variations of the words. This can help in catching more instances of prohibited content. The default value is True.

πŸ” Text Prompt Blocker (Preview) Output Parameters:

original_prompt

The original_prompt output returns the original text that was input into the node. This allows you to verify which text was analyzed and ensures that the output corresponds to the correct input.

status

The status output provides a summary of the detection results. If prohibited words are found, it will indicate the number of detected words with a warning message. If no prohibited words are detected, it will confirm that the prompt is clean. This output helps you quickly assess the content's compliance status.

detected_words

The detected_words output lists the specific words or phrases that were identified as prohibited within the input text. This list is limited to the first ten detected words to prevent overwhelming the user, with an indication if more words were found. This output is crucial for understanding which parts of the text may need revision.

πŸ” Text Prompt Blocker (Preview) Usage Tips:

  • Use the TextPromptBlockerPreview node to test and refine your list of blocked words before implementing strict content moderation, ensuring that your settings are both effective and appropriate.
  • Enable detect_contained to catch prohibited words that may appear within other words, providing a more comprehensive analysis of the text.
  • Utilize the expand_variations option to automatically include variations of blocked words, enhancing the node's ability to detect a wider range of prohibited content.

πŸ” Text Prompt Blocker (Preview) Common Errors and Solutions:

No specific error messages

  • Explanation: The TextPromptBlockerPreview node is designed to be non-blocking and primarily for testing purposes, so it does not generate specific error messages related to its operation.
  • Solution: If you encounter unexpected behavior, ensure that your input parameters are correctly configured and that the text and blocked words are formatted properly. If issues persist, review the node's settings and adjust as needed.

πŸ” Text Prompt Blocker (Preview) Related Nodes

Go back to the extension to check out more related nodes.
COMFYUI_PROMPTMODELS
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 Models, enabling artists to harness the latest AI tools to create incredible art.

πŸ” Text Prompt Blocker (Preview)