| 🔤 Text Processing | Split, join, and manipulate text strings with precision |
| 📦 Data Conversion | Convert between text and JSON formats easily |
| 🐛 Debug Tools | Print and inspect values during workflow execution |
| ⏱️ Timing Control | Add delays and timing control to your workflows |
| 🔀 Logic & Math | Boolean logic gates and mathematical operations |
| 🔧 Utilities | Essential helpers for workflow optimization and list management |
# Navigate to your ComfyUI custom nodes directory
cd ComfyUI/custom_nodes
# Clone the repository
git clone https://github.com/DebugPadawan/DebugPadawans-ComfyUI-Essentials.git
# Restart ComfyUI📝 Text Splitter - Split text strings by delimiter
Category: DebugPadawan/Text
Splits a text string at a specified delimiter and returns a list of strings.
📥 Inputs:
text(String): The text to split (supports multiline input)delimiter(String): The character(s) to split by (default:",")strip_whitespace(Boolean, optional): Remove leading/trailing whitespace (default:True)remove_empty(Boolean, optional): Remove empty strings from result (default:True)
📤 Outputs:
text_list(List): The split list of stringscount(Integer): Number of elements in the list
💡 Example:
Input: "apple, banana, orange"
Delimiter: ","
Output: ["apple", "banana", "orange"] and 3
Process CSV-like data, split tag lists, separate coordinates, create filename lists, parse prompt components.
🔗 Text Joiner - Combine strings with custom delimiters
Category: DebugPadawan/Text
Combines a list of strings into a single text string with a customizable delimiter.
📥 Inputs:
text_list(List): List of strings to joindelimiter(String): Character(s) to join with (default:", ")prefix(String, optional): Text to add at the beginningsuffix(String, optional): Text to add at the end
📤 Outputs:
joined_text(String): The combined text string
💡 Example:
Input: ["red", "green", "blue"]
Delimiter: " | "
Prefix: "Colors: "
Suffix: " - end"
Output: "Colors: red | green | blue - end"
Combine prompt parts, convert lists to readable text, create metadata tags, build filenames, format output strings.
🔄 Text Replace - Replace specific text in a string
Category: DebugPadawan/Text
Replaces all occurrences of a specific substring within a text string.
📥 Inputs:
text(String): The text to processfind(String): The substring to search forreplace(String): The string to replace it with
📤 Outputs:
text(String): The modified text string
💡 Example:
Input: "A beautiful sunset over the ocean"
Find: "sunset"
Replace: "sunrise"
Output: "A beautiful sunrise over the ocean"
Useful for dynamically adjusting prompts, modifying paths, and cleaning up generated text.
🔍 Text Regex (Search & Replace) - Pattern-based text manipulation
Category: DebugPadawan/Text
Searches for patterns using Regular Expressions and optionally replaces them.
📥 Inputs:
text(String): The text to processpattern(String): The regex pattern to search forreplace(String): The string to replace matches with
📤 Outputs:
text(String): The modified text stringmatches(List): All strings that matched the patternfound(Boolean): True if at least one match was found
Extract numbers, redact sensitive info, complex pattern replacement.
💬 String Formatter - Create custom strings with placeholders
Category: DebugPadawan/Text
Formats a string using f-string-like syntax with up to 5 input strings.
📥 Inputs:
format_string(String): The template string with placeholders (e.g., "Hello {input1}, your number is {input2}").input1-input5(String, optional): Up to five input strings to replace placeholders in theformat_string.
📤 Outputs:
formatted_string(String): The resulting formatted string.
💡 Example:
Format String: "The result of {input1} plus {input2} is {input3}"
Input1: "2"
Input2: "3"
Input3: "5"
Output: "The result of 2 plus 3 is 5"
Useful for constructing dynamic prompts, filenames, messages, or URLs from multiple pieces of data.
🔍 Text Compare - Compare two strings with various modes
Category: DebugPadawan/Text
Compares two text strings and returns a boolean result based on the comparison mode.
📥 Inputs:
text_a(String): First text to comparetext_b(String): Second text to comparemode(List): Comparison mode - equals, not equals, contains, starts with, ends withcase_sensitive(Boolean, optional): Whether comparison is case sensitive (default:True)
📤 Outputs:
result(Boolean): True if comparison matchesresult_text(String): "True" or "False" as string
💡 Example:
Text A: "Hello World"
Text B: "hello"
Mode: "contains"
Case Sensitive: False
Output: True
Useful for conditional workflow branching based on text content.
📏 Text Length - Get string length in characters, words, or lines
Category: DebugPadawan/Text
Measures the length of a text string in different units.
📥 Inputs:
text(String): The text to measurecount_mode(List): What to count - characters, words, lines (default:characters)
📤 Outputs:
length(Integer): The countlength_text(String): The count as a string
💡 Example:
Text: "Hello World"
Mode: "words"
Output: 2
Useful for validating prompt lengths, counting words, or checking character limits.
🔤 Text Case - Transform text case
Category: DebugPadawan/Text
Transforms the case of text strings.
📥 Inputs:
text(String): The text to transformmode(List): Case mode - uppercase, lowercase, capitalize, title case, swap case
📤 Outputs:
result(String): The transformed text
💡 Example:
Input: "hello world"
Mode: "title case"
Output: "Hello World"
Useful for normalizing prompts, formatting titles, or preparing text for processing.
✂️ Text Trim - Remove whitespace from text
Category: DebugPadawan/Text
Removes whitespace from text strings.
📥 Inputs:
text(String): The text to trimmode(List): Where to trim - both, left, right, all (default:both)
📤 Outputs:
result(String): The trimmed text
💡 Example:
Input: " Hello World "
Mode: "both"
Output: "Hello World"
The "all" mode removes all whitespace and collapses multiple spaces into single spaces.
🔤 Text Case Converter - Transform text case styles
Category: DebugPadawan/Text
Converts text to different case styles for formatting prompts, filenames, and display text.
📥 Inputs:
text(String): The text to convertcase_mode(List): Case style - UPPER, lower, Title Case, Sentence case, snake_case, kebab-case, camelCase, PascalCase
📤 Outputs:
converted_text(String): The converted text
💡 Example:
Input: "hello world"
Mode: "Title Case"
Output: "Hello World"
Input: "Hello World"
Mode: "snake_case"
Output: "hello_world"
Input: "hello world"
Mode: "PascalCase"
Output: "HelloWorld"
Normalize prompts, format filenames, convert naming conventions between different systems.
✂️ Text Trimmer - Advanced text trimming options
Category: DebugPadawan/Text
Trims text with various whitespace removal options.
📥 Inputs:
text(String): The text to trimmode(List): Trim mode - both, start, end, all_whitespace, collapse_spaces
📤 Outputs:
trimmed_text(String): The trimmed text
💡 Example:
Input: " Hello World "
Mode: "collapse_spaces"
Output: "Hello World"
Mode: "all_whitespace"
Output: "HelloWorld"
Clean up prompt formatting, remove extra spaces, prepare text for further processing.
📎 Text Prefix Suffix - Add prefix and/or suffix to text
Category: DebugPadawan/Text
Adds prefix and/or suffix to text with optional spacing.
📥 Inputs:
text(String): The base textprefix(String, optional): Text to add at the beginningsuffix(String, optional): Text to add at the endadd_space(Boolean): Add space between parts (default: True)
📤 Outputs:
result_text(String): The modified text
💡 Example:
Text: "beautiful"
Prefix: "a"
Suffix: "sunset"
Output: "a beautiful sunset"
Build complex prompts from components, wrap text with markers, add modifiers to prompts.
🗃️ TextToJSON - Convert text to JSON
Category: DebugPadawan/JSON
Converts a valid JSON string into a JSON object, enabling further data processing or integration with other nodes.
📥 Inputs:
text(String): The text to parse as JSON
📤 Outputs:
json(JSON/Object): The parsed JSON object
💡 Example:
Input: '{"name": "Alice", "age": 30}'
Output: { "name": "Alice", "age": 30 }
Use this node to quickly transform JSON-formatted text into a usable data structure for your ComfyUI workflows.
💬 JSONToText - Convert JSON to text
Category: DebugPadawan/JSON
Converts a JSON object back into a formatted JSON string.
📥 Inputs:
json_data(JSON/Object): The JSON object to convert.indent(Integer, optional): Number of spaces for indentation (0 for no indentation, default:0).
📤 Outputs:
text(String): The JSON object as a string.
💡 Example:
Input: { "name": "Alice", "age": 30 }
Indent: 2
Output:
{
"name": "Alice",
"age": 30
}
Use this node to convert JSON data into a readable string for display, logging, or integration with nodes that expect string input.
🖨️ Debug Print - Console output for debugging
Category: DebugPadawan/Debug
Prints values to the console without interrupting the workflow. Perfect for debugging and monitoring data values during execution.
📥 Inputs:
value(Any): Any value to print to console (supports all data types)label(String, optional): Label for the debug output (default:"Debug")
📤 Outputs:
passthrough(Any): The same value passed through unchanged
💻 Console Output:
[MyLabel] list: ['Element1', 'Element2', 'Element3']
[Debug] str: Hello World
[Checkpoint] int: 42
[Data Flow] dict: {'key': 'value', 'count': 5}
[Boolean Test] bool: True
[Float Value] float: 3.14159
Monitor values during execution, debug complex workflows, verify data types, set checkpoints, troubleshoot unexpected results.
⏳ Wait - Add delays to workflow execution
Category: DebugPadawan/Timing
Pauses workflow execution for a specified duration. Useful for rate limiting, timing control, or debugging workflow sequences.
📥 Inputs:
value(Any): Any value to pass through after the delaydelay_seconds(Float): Duration to wait in seconds (default:1.0)label(String, optional): Label for console output (default:"Wait")
📤 Outputs:
passthrough(Any): The same value passed through after delay
💻 Console Output:
[Wait] Waiting for 2.5 seconds...
[Wait] Wait completed.
[Custom Timer] Waiting for 5.0 seconds...
[Custom Timer] Wait completed.
Rate limit API calls, debug timing issues, control workflow execution speed, add pauses between operations, synchronize parallel processes.
📐 Image Info - Extract image tensor dimensions
Category: DebugPadawan/Image
Extracts the width, height, and batch size from a ComfyUI Image tensor.
📥 Inputs:
image(Image): The image tensor to analyze
📤 Outputs:
width(Integer): Image width in pixelsheight(Integer): Image height in pixelsbatch_size(Integer): Number of images in the batch
Useful for dynamic resizing, conditional logic based on aspect ratio, or passing dimensions to other nodes.
🎨 Color Palette Extractor - Get dominant colors from an image
Category: DebugPadawan/Image
Analyzes an image and extracts the most dominant colors as hex strings and a visual palette.
📥 Inputs:
image(Image): The image to analyze.color_count(Integer): Number of colors to extract (default: 5, max: 20).
📤 Outputs:
hex_list(String): Comma-separated list of top hex colors.dominant_color(String): The most frequent hex color.palette_image(Image): A generated image showing the extracted color palette.
Maintain consistent styles, extract themes from reference images, or use colors for conditional prompting.
➕ Int/Float Math Operation - Perform basic arithmetic
Category: DebugPadawan/Math
Performs simple math operations (add, subtract, multiply, divide, modulo, power) on integers or floats.
📥 Inputs:
a,b(Int/Float): The values to calculateoperation(List): The type of mathematical operation
📤 Outputs:
result(Int/Float): The calculated value (returns both Int and Float variations)
🎲 Random Generator - Seed-based random values
Category: DebugPadawan/Math
Generates a random float or integer between a min and max value, driven by a specific seed for reproducibility.
📥 Inputs:
seed(Integer): Seed for the random generatormin_val,max_val(Float/Integer): The range boundsmode(List): Whether to generate a float or an int
📤 Outputs:
val(Float/Integer): The random value (returns both Int and Float formats)
📝 Get List Item - Retrieve an item from a list by index
Category: DebugPadawan/List
Retrieves a specific item from a list based on its index. Supports converting some iterable types to lists.
📥 Inputs:
input_list(Any, List force input): The input list or iterable.index(Integer): The zero-based index of the item to retrieve.
📤 Outputs:
item(Any): The item at the specified index.
💡 Example:
Input List: ["apple", "banana", "orange"]
Index: 1
Output: "banana"
Useful for extracting specific elements from lists, such as getting a particular image from a batch, a specific tag from a list, or individual components from a parsed string list.
✂️ List Slicer - Extract a range of items from a list
Category: DebugPadawan/List
Extracts a sub-list from a larger list using start and end indices.
📥 Inputs:
input_list(List): The input list.start(Integer): Starting index (inclusive).end(Integer): Ending index (exclusive, use 0 for "to the end").
📤 Outputs:
list_slice(List): The sub-list.count(Integer): Number of elements in the slice.
Get the first N images of a batch, skip the first item, or take a specific range of values.
🎲 Random List Selector - Pick random items from a list
Category: DebugPadawan/List
Randomly selects one or more items from a list with seed-based reproducibility.
📥 Inputs:
input_list(List): The input list.seed(Integer): Seed for reproducible random selection.count(Integer): Number of items to select (default: 1).allow_duplicates(Boolean): Allow selecting the same item multiple times.
📤 Outputs:
selected_items(List): The randomly selected items.count(Integer): Number of items selected.first_item(Any): The first selected item (convenient for single selections).
💡 Example:
Input List: ["style1", "style2", "style3", "style4", "style5"]
Seed: 42
Count: 2
Output: ["style3", "style1"]
Perfect for randomizing prompt styles, selecting random seeds, or picking random colors/tags from lists.
🔀 List Shuffler - Shuffle list order deterministically
Category: DebugPadawan/List
Shuffles a list into random order using a seed for reproducibility.
📥 Inputs:
input_list(List): The input list.seed(Integer): Seed for reproducible shuffling.
📤 Outputs:
shuffled_list(List): The shuffled list.count(Integer): Number of items.
💡 Example:
Input: ["a", "b", "c", "d"]
Seed: 123
Output: ["c", "a", "d", "b"]
Randomize processing order, shuffle prompt components, or reorder batch elements.
🔗 List Merger - Combine multiple lists
Category: DebugPadawan/List
Merges two lists together with different modes.
📥 Inputs:
list_a(List): First list.list_b(List): Second list.mode(List): Merge mode - "concatenate" or "interleave".
📤 Outputs:
merged_list(List): The merged list.count(Integer): Number of items.
💡 Example:
List A: [1, 2, 3]
List B: ["a", "b", "c"]
Mode: "interleave"
Output: [1, "a", 2, "b", 3, "c"]
Combine tag lists, merge processing pipelines, or interleave prompt components.
🧹 List Deduplicator - Remove duplicates from a list
Category: DebugPadawan/List
Removes duplicate items from a list while preserving order.
📥 Inputs:
input_list(List): The input list.
📤 Outputs:
deduplicated_list(List): List with duplicates removed.count(Integer): Number of unique items.removed_count(Integer): Number of duplicates removed.
💡 Example:
Input: ["apple", "banana", "apple", "orange", "banana"]
Output: ["apple", "banana", "orange"], count: 3, removed: 2
Clean up tag lists, remove redundant prompts, or filter unique values.
🔀 Type Converter - Universal type conversion
Category: DebugPadawan/Conversion
Converts between different data types: string, int, float, and boolean.
📥 Inputs:
value(Any): The value to convertoutput_type(List): Target type - string, int, float, boolean
📤 Outputs:
converted(Any): The converted value
💡 Example:
Input: 42 (int)
Type: "string"
Output: "42"
Input: "3.14" (string)
Type: "float"
Output: 3.14
Convert any value to any type, workflow data type compatibility, normalize inputs for nodes that require specific types.
🔢 Int to Float - Convert integer to float
Category: DebugPadawan/Conversion
Converts an integer to a floating-point number.
📥 Inputs:
value(Integer): The integer to convert
📤 Outputs:
float_value(Float): The converted float
Useful for nodes that only accept float inputs.
📐 Float to Int - Convert float to integer
Category: DebugPadawan/Conversion
Converts a float to an integer with rounding mode control.
📥 Inputs:
value(Float): The float to convertmode(List): Rounding mode - round, floor, ceil
📤 Outputs:
int_value(Integer): The converted integer
💡 Example:
Input: 3.7
Mode: "floor"
Output: 3
Input: 3.2
Mode: "ceil"
Output: 4
🔤 String to Int - Parse string as integer
Category: DebugPadawan/Conversion
Converts a string to an integer.
📥 Inputs:
value(String): The string to parse
📤 Outputs:
int_value(Integer): The parsed integer
Handles strings like "42" or "3.14" (converts via float first).
🔤 String to Float - Parse string as float
Category: DebugPadawan/Conversion
Converts a string to a floating-point number.
📥 Inputs:
value(String): The string to parse
📤 Outputs:
float_value(Float): The parsed float
💡 Example:
Input: "3.14159"
Output: 3.14159
🔤 String to Boolean - Parse string as boolean
Category: DebugPadawan/Conversion
Converts a string to a boolean value.
📥 Inputs:
value(String): The string to parse
📤 Outputs:
bool_value(Boolean): The parsed boolean
💡 Example:
Input: "true" → Output: True
Input: "yes" → Output: True
Input: "false" → Output: False
Input: "0" → Output: False
Recognizes: true/false, yes/no, 1/0, on/off (case insensitive).
🔢 Number to String - Format number as string
Category: DebugPadawan/Conversion
Converts a number to a string with decimal precision control.
📥 Inputs:
value(Float): The number to convertdecimal_places(Integer): Number of decimal places (0-10)
📤 Outputs:
string_value(String): The formatted string
💡 Example:
Input: 3.14159
Decimal Places: 2
Output: "3.14"
Input: 3.14159
Decimal Places: 0
Output: "3"
📏 Number Clamp - Clamp value between min and max
Category: DebugPadawan/Number
Clamps a number to stay within a specified range.
📥 Inputs:
value(Float): The value to clampmin_val(Float): Minimum allowed value (default: 0.0)max_val(Float): Maximum allowed value (default: 1.0)
📤 Outputs:
clamped(Float): The clamped value
💡 Example:
Input: 1.5, min: 0.0, max: 1.0
Output: 1.0
Input: -0.5, min: 0.0, max: 1.0
Output: 0.0
Useful for ensuring values stay within valid ranges, like RGB values or percentages.
🔢 Number Round - Round with precision control
Category: DebugPadawan/Number
Rounds a number to a specified number of decimal places.
📥 Inputs:
value(Float): The value to rounddecimal_places(Integer): Number of decimal places (0-10)
📤 Outputs:
rounded(Float): The rounded valuerounded_string(String): The rounded value as a formatted string
💡 Example:
Input: 3.14159
Decimal Places: 2
Output: 3.14, "3.14"
📊 Number Range - Generate number sequence
Category: DebugPadawan/Number
Generates a list of numbers from start to end with a step.
📥 Inputs:
start(Integer): Starting valueend(Integer): Ending value (exclusive)step(Integer): Step increment
📤 Outputs:
range_list(List): List of integerscount(Integer): Number of items
💡 Example:
Start: 0, End: 10, Step: 2
Output: [0, 2, 4, 6, 8], 5
⚖️ Number Compare - Compare two numbers
Category: DebugPadawan/Number
Compares two numbers and returns a boolean result.
📥 Inputs:
a(Float): First valueb(Float): Second valuecomparison(List): Comparison type - equal, not equal, greater, less, greater or equal, less or equal
📤 Outputs:
result(Boolean): Comparison resultresult_text(String): Result as text ("True"/"False")
Useful for conditional workflow branching based on numeric values.
📏 Number Absolute - Get absolute value
Category: DebugPadawan/Number
Returns the absolute (positive) value of a number.
📥 Inputs:
value(Float): The value
📤 Outputs:
absolute(Float): The absolute value
💡 Example:
Input: -5.3
Output: 5.3
➖ Number Sign - Get sign of a number
Category: DebugPadawan/Number
Returns the sign of a number (-1, 0, or 1).
📥 Inputs:
value(Float): The value
📤 Outputs:
sign(Integer): -1 (negative), 0 (zero), or 1 (positive)sign_text(String): "negative", "zero", or "positive"
💡 Example:
Input: 42 → Output: 1, "positive"
Input: -3.5 → Output: -1, "negative"
Input: 0 → Output: 0, "zero"
🔄 Number Remap - Remap value between ranges
Category: DebugPadawan/Number
Remaps a value from one range to another (linear interpolation).
📥 Inputs:
value(Float): The value to remapfrom_min(Float): Source range minimumfrom_max(Float): Source range maximumto_min(Float): Target range minimumto_max(Float): Target range maximum
📤 Outputs:
remapped(Float): The remapped value
💡 Example:
Input: 0.5, from: [0, 1], to: [0, 100]
Output: 50.0
Input: 25, from: [0, 100], to: [0, 1]
Output: 0.25
Perfect for normalizing values or converting between different scales.
📊 Number Lerp - Linear interpolation
Category: DebugPadawan/Number
Performs linear interpolation between two values.
📥 Inputs:
a(Float): Start valueb(Float): End valuet(Float): Interpolation factor (0.0 to 1.0)
📤 Outputs:
lerped(Float): The interpolated value
💡 Example:
a: 0, b: 100, t: 0.5
Output: 50.0
a: 10, b: 20, t: 0.25
Output: 12.5
Useful for smooth transitions and blending values.
📊 List Info - Analyze list properties
Category: DebugPadawan/Utilities
Analyzes a list and returns useful information about it.
📥 Inputs:
input_list(List): The list to analyze
📤 Outputs:
count(Integer): Number of elementsfirst_item(String): First element (as string)last_item(String): Last element (as string)
Validate list processing results, get quick statistics, check if lists are empty, extract boundary values.
🔀 Conditional String - Boolean-based string selection
Category: DebugPadawan/Logic
Returns one of two strings based on a boolean condition.
📥 Inputs:
condition(Boolean): The condition to evaluatetrue_string(String): String to return if True (default:"True")false_string(String): String to return if False (default:"False")
📤 Outputs:
result(String): The selected string
Conditional prompt modification, dynamic filename generation, workflow branching, status message generation.
🔌 Logic Gate - Boolean operations
Category: DebugPadawan/Logic
Performs AND, OR, NOT, or XOR operations on boolean inputs.
📥 Inputs:
a,b(Boolean): Boolean values.operation(List): AND, OR, NOT (A), XOR.
📤 Outputs:
result(Boolean): The resulting boolean value.
Complex workflow branching and conditional logic.
"apple,banana,orange" → Text Splitter → ["apple", "banana", "orange"]
↓
["apple", "banana", "orange"] → Text Joiner → "apple | banana | orange"
'{"foo": "bar"}' → TextToJSON → { "foo": "bar" }
Input Data → Debug Print ("Input") → Processing Node → Debug Print ("Output") → Result
Data → Wait (2.0s) → Processing → Wait (1.0s) → Output
| Category | Nodes | Purpose |
|---|---|---|
| DebugPadawan/Text | Text Splitter, Text Joiner, Text Replace, Text Regex, String Formatter, Text Compare, Text Length, Text Case, Text Trim, Text Case Converter, Text Trimmer, Text Prefix Suffix | Text manipulation and processing |
| DebugPadawan/JSON | TextToJSON, JSONToText | Text to JSON conversion |
| DebugPadawan/Debug | Debug Print | Debugging and monitoring |
| DebugPadawan/Timing | Wait | Timing control and delays |
| DebugPadawan/Utilities | List Info | Data analysis helpers |
| DebugPadawan/Logic | Conditional String, Logic Gate | Conditional operations |
| DebugPadawan/Image | Image Info, Color Palette Extractor | Image tensor analysis and color extraction |
| DebugPadawan/Math | Int/Float Math Operation, Random Generator | Basic arithmetic and random number generation |
| DebugPadawan/List | Get List Item, List Slicer, Random List Selector, List Shuffler, List Merger, List Deduplicator | List manipulation |
| DebugPadawan/Conversion | Type Converter, Int to Float, Float to Int, String to Int, String to Float, String to Boolean, Number to String | Type conversion utilities |
| DebugPadawan/Number | Number Clamp, Number Round, Number Range, Number Compare, Number Absolute, Number Sign, Number Remap, Number Lerp | Number formatting and utilities |
We welcome contributions! Feel free to:
- 🐛 Report bugs
- 💡 Suggest new features
- 🔧 Submit pull requests
- 📖 Improve documentation
This project is licensed under the MIT License.
Made with ❤️ by DebugPadawan