ComfyUI > Nodes > ComfyUI_StarNodes > ⭐ Star Text Filter

ComfyUI Node: ⭐ Star Text Filter

Class Name

StarTextFilter

Category
⭐StarNodes/Text And Data
Author
Starnodes2024 (Account age: 326days)
Extension
ComfyUI_StarNodes
Latest Updated
2025-05-10
Github Stars
0.04K

How to Install ComfyUI_StarNodes

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

⭐ Star Text Filter Description

Versatile text data manipulation tool with various filtering options for streamlining and refining text processing efficiently.

⭐ Star Text Filter:

The StarTextFilter node is a versatile tool designed to manipulate and refine text data by applying various filtering techniques. Its primary purpose is to streamline text processing by removing unwanted elements such as empty lines, excessive whitespace, or specific text segments between defined words. This node is particularly beneficial for cleaning up text data, making it more readable and structured, which is essential for tasks that require precise text input. By offering a range of filtering options, the StarTextFilter node allows you to customize the text processing to suit your specific needs, ensuring that the output is tailored to your requirements. Whether you need to strip lines of unnecessary spaces or remove text between certain keywords, this node provides a straightforward and efficient solution.

⭐ Star Text Filter Input Parameters:

text

The text parameter is the main input for the node, where you provide the string data that you want to process. This parameter accepts multiline strings, allowing you to input complex text data that may span several lines. The content of this parameter is crucial as it determines the scope of the filtering operations applied by the node.

filter_type

The filter_type parameter specifies the type of filtering operation you wish to perform on the input text. It offers several options, including remove_between_words, remove_before_start_word, remove_after_end_word, remove_empty_lines, remove_whitespace, and strip_lines. Each option targets a specific aspect of the text, such as removing text between specified words or eliminating extra spaces. This parameter is essential for directing the node's functionality and achieving the desired text output.

start_word

The start_word parameter is used in conjunction with certain filter types, such as remove_between_words and remove_before_start_word. It defines the starting point for the filtering operation, allowing you to specify a word or phrase that marks the beginning of the text segment you want to manipulate. The default value is "INPUT", but you can customize it to match your specific requirements.

end_word

Similar to start_word, the end_word parameter is utilized with filter types like remove_between_words and remove_after_end_word. It indicates the endpoint for the filtering operation, enabling you to define a word or phrase that marks the end of the text segment you wish to alter. The default value is "INPUT", and it can be adjusted to fit the context of your text processing task.

⭐ Star Text Filter Output Parameters:

STRING

The output of the StarTextFilter node is a single string, which is the processed version of the input text after the specified filtering operations have been applied. This output is crucial as it represents the refined text data, free from unwanted elements, and ready for further use in your projects. The output string maintains the structure and content integrity of the original text, ensuring that only the specified modifications are made.

⭐ Star Text Filter Usage Tips:

  • To remove all empty lines from a text, use the remove_empty_lines filter type. This is particularly useful for cleaning up text that has been copied from sources with inconsistent formatting.
  • If you need to eliminate all whitespace from a text, select the remove_whitespace filter type. This can be helpful when preparing text for environments where spacing is not preserved.
  • Use the remove_between_words filter type to delete text between specific start and end words. This is ideal for extracting relevant information from structured text data.

⭐ Star Text Filter Common Errors and Solutions:

No text provided

  • Explanation: This error occurs when the text parameter is left empty or not provided.
  • Solution: Ensure that you input a valid string in the text parameter before executing the node.

Invalid filter type

  • Explanation: This error arises when an unsupported filter type is specified in the filter_type parameter.
  • Solution: Double-check the available filter types and select one from the provided options.

Start or end word not found

  • Explanation: This error happens when the specified start_word or end_word is not present in the input text.
  • Solution: Verify that the start_word and end_word are correctly specified and exist within the text. Adjust them if necessary to match the content.

⭐ Star Text Filter Related Nodes

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