ComfyUI_StringOps
StringOps is a versatile text processing toolkit built for ComfyUI's node-based workflows
Nodes (62)
Wrap any string in a prefix and suffix — the two-field wrapper
Prefix and suffix every line of a block — formatting lists in bulk
Run a whole dictionary of text replacements in one pass
Does this text contain that string? Returns 1 or 0, ready to route on
Classify a number as small, medium, or large — then route on the label
Pick one of two strings based on a substring check
Count how many times a string appears — as both a number and text
Crop an image and its mask in lockstep, so inpainting never misaligns
VAE-decode to a preview — and still keep the image on the wire
Pull a range or a set of lines and rejoin them into one string
Grab everything before or after a marker — first or last occurrence, your call
Slice a block of text into five named chunks in one node
Two mini-languages for pulling structured data out of text
Pull exact lines out of a block by position — with a bonus combined output
Pull the text trapped between two labels — the tag-between extractor
Cut a string by character range instead of guessing a regex
Copy or move files from inside a workflow — with a status string instead of a crash
Clean out your ComfyUI output folder from inside a workflow — carefully
List every file in a folder by extension — full paths, count, and a list, all at once
Rename in your graph without touching the disk — it builds the new path, you decide what to do with it
Keep or drop lines by keyword — grep, but inside your workflow graph
Keep only the lines that are the right length — a dumb filter that's quietly great
Search an Excel sheet from inside a workflow and get the cell's row and column back
Scan lines for a marker and return everything after it on that line
Stop fighting ComfyUI over int vs float — round, ceil, floor, or snap to 32
Build a padded number list for batch queues without math nodes
One node that turns a plain scene description into a cinematic video prompt
Load an image from a path, a URL, or a base64 blob — one input, same IMAGE out
A live clock in your graph — and the pack's built-in 'random' seed trick
The text-to-float bridge for config lines and batch output
Find the line that contains your key and hand back the int value on it
A random number node that re-rolls every single run — that's the point
One node to resize any image to a sane, model-friendly size — and hand you back width and height
Stack two images with alignment, scale, and opacity — watermark and composition in one node
One node that loads an image, resizes it, and hands you a mask
Four inputs, four outputs, zero processing — the pass-through node
Turning a '2|3' string into two usable integers
One node to clean every prompt before it hits the text encoder
The wildcard-style random prompt picker, without the wildcard plugin
Reading cells out of an .xlsx and into your workflow
How many filled cells are in that row? This node counts and diffs them
It's called 'read page' but it actually phones home to the author's server
Strip everything between two characters — parens, brackets, tags, gone
Replace the same string N times — each time with a different value
Replace only the 3rd 'X' — or every one, if you set it to 0
Save images to any folder you want — and get the image back out
A gender + orientation picker that outputs '1+1' — and probably isn't for you
Randomize your lines, fresh every single run
A random seed you can actually wire in — string and int, fresh every run
The boring find-and-replace node you'll reach for constantly
A text input node with zero processing. Yes, that's the whole thing.
Grab the nth piece of a delimited string — forward or backward
Split a string in two at the first delimiter you give it
Snap your resolution to a small/medium/large preset in one step
Rules with [1] [2] placeholders, up to five outputs
Join up to four strings in any order you like — not just 1+2+3+4
Turn 'is this prompt good enough' into a clean 0 or 1
Turn text into an image — with working Chinese font support out of the box
Turn a multiline box into a real STRING list — clean and empty-line-free
Write your workflow's output back into an .xlsx, row by row
Embed Generated Images Into Excel Cells Without Leaving ComfyUI
Log Prompts and Metadata to a TXT File in 30 Seconds
ComfyUI_StringOps
Efficient Text Processing Tool for ComfyUI Workflow
ComfyUI_StringOps is an advanced text processing tool tailored for the ComfyUI workflow, offering robust text manipulation capabilities to address core issues such as text preprocessing, data transformation, and batch automation, enabling efficient and precise operations.
-
Batch Replacement: Supports partial or global batch replacement of strings for rapid text processing and delivery to subsequent processes, enhancing task efficiency.
-
Intelligent Splitting/Concatenation: Splits text based on character counts and delimiters, and supports flexible recombination of multiple text segments to meet complex processing needs.
-
Precise Extraction: Accurately extracts specified content from text using positional indexing and keyword matching, providing precise data support for subsequent processes.
-
Integration with Excel: Achieves deep integration with Excel, supporting read and write operations on paged and tabular data, facilitating batch completion of complex tasks and significantly improving efficiency.
Update Notes (2025-06-05):
1.Added LoadAndAdjustImage node to load and resize images.
2.Added SaveImagEX node to save images to a specified directory (also added an image output port).
3.Added functionality to get the current timestamp (can be used as a random seed).
4.Added the ability to copy and cut files.
5.Added the feature of reading web page content.
6.Added text layout to image node, image layer overlay node.
Partial Node Display
Text Processing Node





Table Data Read/Write Nodes

ComfyUI_StringOps excels in handling prompts within workflows, especially in organizing and optimizing them, thereby significantly enhancing efficiency and accuracy.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/MeeeyoAI/ComfyUI_StringOps.git
Or download the zip file and extracted, copy the resulting folder to ComfyUI\custom_nodes Restart ComfyUI.
More Info
✅ bilibili: https://space.bilibili.com/3546690300676691
✅ Website: http://www.meeeyo.com
✅ Sponsorship: https://t.zsxq.com/ufSS2
✅ WeChat: meeeyo
