Extensions/comfyui-prompt-clean-append
ComfyUI Extension

comfyui-prompt-clean-append

A small ComfyUI custom node that cleans up prompt text and appends style terms.

By kryzbell2·Created 3 months ago·Updated 3 months ago· 0
kryzbell2/comfyui-prompt-clean-append
Nodes1
On cloudLocal install
Categorytext/prompt
Stars0
Updated3 months ago
Readme

ComfyUI Prompt Clean Append

A small ComfyUI custom node that cleans up prompt text and appends style terms.

The node is named Prompt Clean Append. It accepts an existing prompt, removes exact matching unwanted comma-separated prompt tokens, appends new prompt text, and outputs a final string that can be connected to CLIPTextEncode.

Installation

Open a terminal and go to your ComfyUI custom nodes folder:

cd ComfyUI/custom_nodes

Clone this repository:

git clone https://github.com/kryzbell2/comfyui-prompt-clean-append.git

Restart ComfyUI.

Basic Workflow

Connect your nodes like this:

prompt reader positive output -> Prompt Clean Append text input
Prompt Clean Append text output -> CLIPTextEncode text input

The node appears in the ComfyUI add-node menu under:

text/prompt

Inputs

  • text: Original prompt text, usually from a prompt reader.
  • remove_terms: Terms to remove. Use one term per line or comma-separated terms.
  • append_text: Text to append after cleanup.
  • separator: Separator used for the final prompt. Default is , .
  • case_sensitive: Match terms with exact case when enabled. Default is off.

Outputs

  • text: The cleaned and appended final prompt.
  • removed_terms: Terms that were actually removed.
  • removed_count: Number of removed prompt tokens.

Example

Input prompt:

masterpiece, amazing quality, illustration, CG, Shadowheart, forest, close_up

Remove terms:

illustration
CG

Append text:

realistic facial proportions, photorealistic studio portrait, natural skin texture

Output:

masterpiece, amazing quality, Shadowheart, forest, close_up, realistic facial proportions, photorealistic studio portrait, natural skin texture

Cartoon-to-Realistic Remove List

anime
cartoon
illustration
CG
cel shading
flat colors
line art
exaggerated eyes
simplified features

Example Append Text

realistic facial proportions, photorealistic studio portrait, natural skin texture, detailed eyes, realistic hair strands, subtle makeup, soft cinematic lighting, high detail, sharp focus

Notes

This node treats the source prompt as comma-separated tokens. It removes only exact token matches, preserves the order of remaining tokens, removes empty tokens, removes duplicate surviving tokens, and then appends the requested text.