Extensions/ComfyUI_StringTools
ComfyUI Extension

ComfyUI_StringTools

Some simple string tools to modify text and strings in ComfyUI.

By bradsec·Created 2 years ago·Updated 2 years ago· 0
bradsec/ComfyUI_StringTools
Nodes
On cloudLocal install
Stars0
Updated2 years ago
Readme

ComfyUI_StringTools

Custom nodes for ComfyUI that enhance functionality by allowing text string modifications.

ModifyStringNode

Supports operations such as substring removal and replacement with other substrings. Useful for altering prompts and outputs generated by large language models (LLMs), enabling refinement of text outputs.

To add the Modify String node: Add Node > StringTools > Modify String

Modify String Node Example

Note: On first use, you may need to drag and resize the Modify String node to see all the text and options.

ShowStringNode

A simple node to display a string in the node itself. To see changes made by the Modify String node, you can link output_string to the input_string of the Show String node.

To add the Show String node: Add Node > StringTools > Show String

Show String Node Example

Usage Example

Node Usage Example

TextStringNode

A simple multiline text string node with the ability to remove whitespace or newlines if required.

Text String Node Example

ReplaceStringNode

Replace a string, such as the word prompt, with a multiline text string.

Replace String Node Example

RandomStringNode

Takes up to six string inputs and outputs one string at random. Each output is unique.

Random String Node Example

Installation

# Change to the directory you installed ComfyUI
cd pathTo/ComfyUI

# Navigate to the custom_nodes directory
cd custom_nodes

# Clone the repo into custom_nodes
git clone https://github.com/bradsec/ComfyUI_StringTools.git

# Restart ComfyUI