Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > Sage Utils > Clean Text

ComfyUI Node: Clean Text

Class Name

Sage_CleanText

Category
Sage Utils/text
Author
arcum42 (Account age: 6442days)
Extension
Sage Utils
Latest Updated
2026-05-17
Github Stars
0.03K

How to Install Sage Utils

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

Clean Text Description

Sage_CleanText removes unwanted characters and formatting, ensuring clean text for processing.

Clean Text:

The Sage_CleanText node is designed to streamline and sanitize text input by removing unwanted characters or formatting, ensuring that the resulting string is clean and ready for further processing or analysis. This node is particularly useful in scenarios where text data may contain extraneous elements such as whitespace, special characters, or other formatting issues that could interfere with subsequent operations. By providing a straightforward mechanism to clean up text, Sage_CleanText enhances the quality and consistency of text data, making it more suitable for use in various applications, including AI art generation, data analysis, and more. Its primary goal is to deliver a polished and uniform text output that can seamlessly integrate into your workflow.

Clean Text Input Parameters:

str

The str parameter is the primary input for the Sage_CleanText node, representing the string that you wish to clean. This parameter accepts any text input, which can include multiple lines and various characters. The function of this parameter is to provide the raw text data that the node will process to remove unwanted elements. There are no specific minimum or maximum values for this parameter, as it is designed to handle any string input. However, it is important to ensure that the text provided is relevant to your intended use case, as the node will output a cleaned version of this input.

Clean Text Output Parameters:

cleaned_string

The cleaned_string output parameter represents the result of the cleaning process performed by the Sage_CleanText node. This output is a refined version of the input string, with unnecessary characters and formatting removed to produce a clean and consistent text. The importance of this output lies in its ability to provide a standardized text format that can be easily utilized in further processing or analysis tasks. The cleaned string ensures that any subsequent operations are not hindered by extraneous elements, thereby improving the overall efficiency and effectiveness of your workflow.

Clean Text Usage Tips:

  • Ensure that the input string is relevant to your task, as the node will clean the text but not alter its fundamental content or meaning.
  • Use Sage_CleanText as a preprocessing step before feeding text into other nodes or systems that require clean and consistent input for optimal performance.

Clean Text Common Errors and Solutions:

Input string is empty

  • Explanation: This error occurs when the input string provided to the node is empty or consists solely of whitespace.
  • Solution: Verify that the input string contains meaningful content before passing it to the node. Ensure that the text is not inadvertently stripped of content during earlier processing steps.

Unexpected characters in output

  • Explanation: If the output contains unexpected characters, it may be due to the input string containing special characters that were not removed during cleaning.
  • Solution: Review the input string for any special characters that may require additional handling. Consider preprocessing the text to remove or replace these characters before using the Sage_CleanText node.

Clean Text Related Nodes

Go back to the extension to check out more related nodes.
Sage Utils
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.

Clean Text