ComfyUI > Nodes > CRT-Nodes > String Splitter (CRT)

ComfyUI Node: String Splitter (CRT)

Class Name

CRT_StringSplitter

Category
CRT/Text
Author
CRT (Account age: 1707days)
Extension
CRT-Nodes
Latest Updated
2026-03-16
Github Stars
0.1K

How to Install CRT-Nodes

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

String Splitter (CRT) Description

The CRT_StringSplitter node divides strings into segments based on custom criteria for text analysis.

String Splitter (CRT):

The CRT_StringSplitter node is designed to efficiently divide a single string into multiple segments based on specified criteria, making it a versatile tool for text manipulation tasks. This node is particularly useful when you need to process or analyze different parts of a text separately, such as splitting paragraphs or sections of a document. By allowing you to define a custom symbol for splitting or defaulting to empty lines, it provides flexibility in how the text is divided. The node also offers the option to strip whitespace from each segment, ensuring clean and precise outputs. Its primary goal is to simplify the process of breaking down complex strings into manageable parts, enhancing your ability to work with text data in creative and structured ways.

String Splitter (CRT) Input Parameters:

text

This parameter represents the input string that you want to split. It supports multiline text, allowing you to input paragraphs or large blocks of text. The default value is a sample text with two paragraphs, but you can replace it with any text you need to process. The function of this parameter is to provide the raw data that will be divided into segments based on the specified criteria.

split_count

The split_count parameter determines the number of segments you want to extract from the input text. It is an integer value with a default of 2, a minimum of 1, and a maximum of 64. This parameter controls how many parts of the split text will be actively returned, allowing you to manage the granularity of the output.

split_symbol

This parameter allows you to specify a custom character or string to use as the delimiter for splitting the text. If left empty, the node will default to splitting by empty lines. This flexibility enables you to tailor the splitting process to your specific needs, whether you're working with structured data or free-form text.

strip_whitespace

The strip_whitespace parameter is a boolean option that, when enabled, removes leading and trailing whitespace from each split segment. The default setting is True, which helps ensure that the resulting segments are clean and free of unnecessary spaces. This is particularly useful for maintaining the integrity of the text data and ensuring consistent formatting.

String Splitter (CRT) Output Parameters:

string_1, string_2, ..., string_64

These output parameters represent the individual segments of the input text after it has been split according to the specified criteria. Each output corresponds to a part of the text, with the number of active outputs determined by the split_count parameter. If the number of segments is less than the maximum allowed, the remaining outputs will be empty strings. This structured output format allows you to easily access and utilize each part of the text for further processing or analysis.

String Splitter (CRT) Usage Tips:

  • Use the split_symbol parameter to customize how your text is divided, especially when working with structured data that uses specific delimiters.
  • Enable strip_whitespace to ensure that each segment is clean and free of unnecessary spaces, which can be particularly useful when preparing text for further processing or analysis.
  • Adjust the split_count to match the number of segments you need, keeping in mind that the node can handle up to 64 outputs, providing flexibility for various text processing tasks.

String Splitter (CRT) Common Errors and Solutions:

Warning: Input text is empty.

  • Explanation: This warning occurs when the input text is either empty or consists solely of whitespace.
  • Solution: Ensure that the text parameter contains valid content before attempting to split it. Double-check your input to confirm that it is not empty or filled with only spaces.

Using custom symbol for splitting: '' (empty string)

  • Explanation: This message indicates that the split_symbol parameter is set to an empty string, causing the node to default to splitting by empty lines.
  • Solution: If you intended to use a specific delimiter, make sure to provide a valid character or string in the split_symbol parameter. If splitting by empty lines is desired, no action is needed.

String Splitter (CRT) Related Nodes

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