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 > dspy_nodes > String Splitter

ComfyUI Node: String Splitter

Class Name

String Splitter

Category
Text
Author
tom-doerr (Account age: 3545days)
Extension
dspy_nodes
Latest Updated
2026-07-10
Github Stars
0.2K

How to Install dspy_nodes

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

The String Splitter node divides a string into equal parts for efficient text manipulation.

String Splitter:

The String Splitter node is designed to divide a given string into a specified number of parts, making it a versatile tool for text manipulation tasks. This node is particularly useful when you need to break down large blocks of text into smaller, more manageable segments. By leveraging the textwrap module, the node ensures that each part is approximately equal in length, providing a balanced distribution of text across the specified number of parts. This functionality is beneficial for tasks such as preparing text for display in limited space environments or for processing text in parallel operations. The node's ability to handle multiline strings and its flexibility in adjusting the number of parts make it an essential component for text processing workflows.

String Splitter Input Parameters:

input_string

The input_string parameter is the text that you want to split into parts. It accepts multiline strings, allowing you to work with complex text structures. This parameter is mandatory, meaning you must provide a string for the node to function. The content of this string directly influences the output, as it determines the text that will be divided into parts.

number_of_parts

The number_of_parts parameter specifies how many parts you want the input string to be divided into. It is an integer value with a default of 2, and it must be at least 1. This parameter controls the granularity of the split operation; a higher number results in more, smaller parts, while a lower number results in fewer, larger parts. Adjusting this parameter allows you to tailor the output to your specific needs, whether you require a detailed breakdown or a broader division of the text.

String Splitter Output Parameters:

Split Strings

The Split Strings output parameter provides the resulting list of strings after the input string has been divided according to the specified number of parts. Each element in this list represents a segment of the original text, with the node ensuring that the parts are as evenly distributed as possible. This output is crucial for further processing or analysis, as it allows you to handle each part individually, facilitating tasks such as parallel processing or targeted text manipulation.

String Splitter Usage Tips:

  • To achieve the most balanced split, ensure that the number_of_parts parameter is set to a value that divides the length of the input_string evenly. This will help maintain uniformity across the resulting parts.
  • If you need to ensure that each part contains a complete sentence or logical unit, consider preprocessing the input_string to insert delimiters at appropriate points before using the String Splitter node.

String Splitter Common Errors and Solutions:

Input string is empty

  • Explanation: This error occurs when the input_string parameter is provided with an empty string.
  • Solution: Ensure that the input_string contains text before passing it to the node. Check your input source to confirm that it is supplying the expected data.

Number of parts is less than 1

  • Explanation: The number_of_parts parameter must be at least 1, as a value less than this is invalid for splitting operations.
  • Solution: Adjust the number_of_parts parameter to be 1 or greater. Verify that the input value is correctly set in your configuration or script.

String Splitter Related Nodes

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

String Splitter