Back to all packs
basic_data_handling banner

basic_data_handling

Description unavailable.

View repository
Publisher
Downloads
GitHub stars
Latest version
License
Last updated

Nodes in this pack

Basic/BOOLEAN

  • and

    Returns the logical AND result of two boolean values. This node takes two boolean inputs and returns their logical AND result.

  • and (generic)

    Returns the logical N/AND result of one or more values. This node takes a dynamic number of inputs and returns their logical N/AND result. Note that values are evaluated according Python's rules. I.e. an empty string is `false`, an integer 0 is also `false`, etc.

  • nand

    Returns the logical NAND result of two boolean values. This node takes two boolean inputs and returns their logical NAND result.

  • nor

    Returns the logical NOR result of two boolean values. This node takes two boolean inputs and returns their logical NOR result.

  • not

    Returns the logical NOT result of a boolean value. This node takes one boolean input and returns its logical NOT result.

  • or

    Returns the logical OR result of two boolean values. This node takes two boolean inputs and returns their logical OR result.

  • or (generic)

    Returns the logical N/OR result of one or more values. This node takes a dynamic number of inputs and returns their logical N/OR result. Note that values are evaluated according Python's rules. I.e. an empty string is `false`, an integer 0 is also `false`, etc.

  • xor

    Returns the logical XOR result of two boolean values. This node takes two boolean inputs and returns their logical XOR result.

Basic/cast

  • to BOOLEAN

    Converts any input to a BOOLEAN. Follows standard Python truthy/falsy rules.

  • to DICT

    Converts compatible inputs to a DICT. Input must be a mapping or a list of key-value pairs.

  • to FLOAT

    Converts any numeric input to a FLOAT. Non-numeric or invalid inputs raise a ValueError.

  • to INT

    Converts any numeric input to an INT. Non-numeric or invalid inputs raise a ValueError.

  • to LIST

    Converts any input to a LIST. Non-list inputs are wrapped in a list. If input is a ComfyUI data list, it converts the individual items into a Python LIST.

  • to SET

    Converts any input to a SET. Non-set inputs are converted into a set. If input is a ComfyUI data list, it casts the individual items into a SET.

  • to STRING

    Converts any input to a STRING. Non-string values are converted using str().

Basic/comparison

  • !=

    Checks if two values are not equal. This node takes two inputs of any type and returns True if they are not equal, and False otherwise. For complex objects, structural inequality is tested.

  • <

    Checks if the first value is less than the second. This node takes two numerical inputs and returns True if the first value is less than the second value, and False otherwise.

  • <=

    Checks if the first value is less than or equal to the second. This node takes two numerical inputs and returns True if the first value is less than or equal to the second value, and False otherwise.

  • ==

    Checks if two values are equal. This node takes two inputs of any type and returns True if they are equal, and False otherwise. For complex objects, structural equality is tested.

  • >

    Checks if the first value is greater than the second. This node takes two numerical inputs and returns True if the first value is greater than the second value, and False otherwise.

  • >=

    Checks if the first value is greater than or equal to the second. This node takes two numerical inputs and returns True if the first value is greater than or equal to the second value, and False otherwise.

  • compare length

    Compares the length of a container (string, list, etc) with a value. This node takes a container and a comparison value, and returns a boolean result based on the comparison of the container's length with the value.

  • is null

    Checks if a value is None/null. This node takes any input value and returns True if the value is None, and False otherwise.

  • string compare

    Compares two strings using a selected comparison operator. This node takes two string inputs and a comparison operator, and returns a boolean result based on the selected comparison.

Basic/Data List

  • all

    Check if all elements in the data list are true. Returns true if all elements are true (or if the list is empty).

  • any

    Check if any element in the data list is true. Returns true if at least one element is true. Returns false if the list is empty.

  • append

    Adds an item to the end of a list. This node takes a list and any item as inputs, then returns the modified list with the new item appended.

  • convert to LIST

    Converts a ComfyUI Data List into a LIST object. This node takes a Data List input (which is typically a list of items with the same type) and converts it to a LIST object (a Python list as a single variable).

  • convert to SET

    Converts a ComfyUI Data List into a LIST object. This node takes a Data List input (which is typically a list of items with the same type) and converts it to a LIST object (a Python list as a single variable).

  • create Data List

    Creates a new Data List from items. This node creates and returns a Data List. The list of items is dynamically extended based on the number of inputs provided.

  • create Data List from BOOLEANs

    Creates a new Data List from BOOLEAN items. This node creates and returns a Data List. The list of items is dynamically extended based on the number of inputs provided.

  • create Data List from FLOATs

    Creates a new Data List from FLOAT items. This node creates and returns a Data List. The list of items is dynamically extended based on the number of inputs provided.

  • create Data List from INTs

    Creates a new Data List from INT items. This node creates and returns a Data List. The list of items is dynamically extended based on the number of inputs provided.

  • create Data List from STRINGs

    Creates a new Data List from STRING items. This node creates and returns a Data List. The list of items is dynamically extended based on the number of inputs provided.

  • create Data List of Lists

    Creates a new Data List from items. This node creates and returns a Data List. The list of items is dynamically extended based on the number of inputs provided. Each input can be a list, so you'll get a list of lists.

  • enumerate

    Enumerate a data list, returning a list of [index, value] pairs. Optionally, specify a starting value for the index.

  • extend

    Extends a list by appending elements from another list. This node takes two lists as input and returns a new list that contains all elements from both lists.

  • filter

    Filters a Data List using boolean values. This node takes a value Data List and a filter Data List (containing only boolean values). It returns a new Data List containing only the elements from the value list where the corresponding element in the filter list is False. If the lists have different lengths, the last element of the shorter list is repeated till the lengths are matching.

  • filter select

    Filters a Data List using boolean values. This node takes a value Data List and a filter Data List (containing only boolean values). It returns two new Data Lists containing only the elements from the value list where the corresponding element in the filter list is true or false. If the lists have different lengths, the last element of the shorter list is repeated till the lengths are matching.

  • first

    Returns the first element in a list. This node takes a list as input and returns the first element of the list. If the list is empty, it returns None.

  • last

    Returns the last element in a list. This node takes a list as input and returns the last element of the list. If the list is empty, it returns None.

  • max

    Finds the maximum value in a list of numbers. This node takes a list of numbers (either FLOAT or INT) and returns the maximum value. Returns None if the list is empty or if it contains non-numeric values.

  • min

    Finds the minimum value in a list of numbers. This node takes a list of numbers (either FLOAT or INT) and returns the minimum value. Returns None if the list is empty or if it contains non-numeric values.

  • pop random

    Removes and returns a random element from a list. This node takes a list as input and returns the list with the random element removed and the removed element itself. If the list is empty, it returns None for the element.

  • range

    Creates a data list containing a sequence of numbers. This node generates a sequence of numbers similar to Python's range() function. It takes start, stop, and step parameters to define the sequence.

  • shuffle

    Shuffles the items in a list using a seed for reproducibility. This node takes a list and a seed as input and returns a new shuffled list.

  • sum

    Sum all elements of the data list. Returns 0 for an empty list.

Basic/DICT

  • compare

    Compares two dictionaries and reports differences. This node takes two dictionaries and compares them, returning information about their equality, any keys that exist in only one dictionary, and any keys with different values.

  • contains key

    Checks if a key exists in a dictionary. This node takes a dictionary and a key as inputs, then returns True if the key exists in the dictionary, and False otherwise.

  • create DICT

    Creates a new empty dictionary. This node creates and returns a new empty dictionary object.

  • create DICT from BOOLEANs

    Creates a new empty dictionary. This node creates and returns a new empty dictionary object.

  • create DICT from FLOATs

    Creates a new empty dictionary. This node creates and returns a new empty dictionary object.

  • create DICT from INTs

    Creates a new empty dictionary. This node creates and returns a new empty dictionary object.

  • create DICT from STRINGs

    Creates a new empty dictionary. This node creates and returns a new empty dictionary object.

  • create from items (data list)

    Creates a dictionary from a list of key-value pairs. This node takes a list of key-value pairs (tuples) and builds a dictionary from them.

  • create from items (LIST)

    Creates a dictionary from a list of key-value pairs. This node takes a list of key-value pairs (tuples) and builds a dictionary from them.

  • create from LISTs

    Creates a dictionary from separate lists of keys and values. This node takes a list of keys and a list of values, then creates a dictionary by pairing corresponding elements from each list. If the lists are of different lengths, only pairs up to the length of the shorter list are used.

  • exclude keys

    Creates a new dictionary excluding the specified keys. This node takes a dictionary and a list of keys, then returns a new dictionary containing all key-value pairs except those with keys in the provided list.

  • filter by keys

    Creates a new dictionary with only the specified keys. This node takes a dictionary and a list of keys, then returns a new dictionary containing only the key-value pairs for the keys that exist in the original dictionary.

  • from keys

    Creates a dictionary from a list of keys and a default value. This node takes a list of keys and an optional value, then creates a new dictionary where each key is associated with the value. If no value is provided, None is used.

  • get

    Retrieves a value from a dictionary using the specified key. This node gets the value for the specified key from a dictionary. If the key is not found and a default value is provided, that default is returned. Otherwise, it returns None.

  • get keys values

    Returns keys and values as separate lists. This node takes a dictionary and returns two lists: one containing all keys and another containing all corresponding values.

  • get multiple

    Retrieves multiple values from a dictionary using a list of keys. This node takes a dictionary and a list of keys, then returns a list containing the corresponding values. If a key is not found, the default value is used for that position.

  • invert

    Creates a new dictionary with keys and values swapped. This node takes a dictionary as input and returns a new dictionary where the keys become values and values become keys. Note that values must be hashable to be used as keys in the new dictionary.

  • items

    Returns all key-value pairs in a dictionary. This node takes a dictionary and returns a list of tuples, where each tuple contains a key-value pair from the dictionary.

  • keys

    Returns all keys in a dictionary. This node takes a dictionary and returns a list containing all of its keys.

  • length

    Returns the number of key-value pairs in a dictionary. This node takes a dictionary as input and returns its length (number of items).

  • merge

    Merges multiple dictionaries into a single dictionary. This node takes multiple dictionaries as input and combines them into a single dictionary. If there are duplicate keys, values from later dictionaries take precedence.

  • pop

    Removes and returns a key-value pair from a dictionary. This node takes a dictionary and a key as inputs, removes the specified key from the dictionary, and returns both the modified dictionary and the value associated with the key. If the key is not found and a default value is provided, that default is returned. Otherwise, an error is raised.

  • pop item

    Removes and returns an arbitrary key-value pair from a dictionary. This node takes a dictionary as input, removes an arbitrary key-value pair, and returns the modified dictionary along with the removed key and value. If the dictionary is empty, returns an error.

  • pop random

    Removes and returns a random key-value pair from a dictionary. This node takes a dictionary as input, removes a random key-value pair, and returns the modified dictionary along with the removed key and value. If the dictionary is empty, it returns empty values.

  • remove

    Removes a key-value pair from a dictionary. This node takes a dictionary and a key as inputs, then returns a new dictionary with the specified key removed. If the key doesn't exist, the dictionary remains unchanged.

  • set

    Adds or updates a key-value pair in a dictionary. This node takes a dictionary, key, and value as inputs, then returns a modified dictionary with the new key-value pair.

  • setdefault

    Returns the value for a key, setting a default if the key doesn't exist. This node takes a dictionary, a key, and a default value. If the key exists in the dictionary, the corresponding value is returned. If the key doesn't exist, the default value is inserted for the key and returned.

  • update

    Updates a dictionary with key-value pairs from another dictionary. This node takes two dictionaries as inputs and returns a new dictionary that contains all key-value pairs from both dictionaries. If there are duplicate keys, the values from the second dictionary take precedence.

  • values

    Returns all values in a dictionary. This node takes a dictionary and returns a list containing all of its values.

Basic/FLOAT

  • add

    Adds two floating-point numbers. This node takes two floats as input and returns their sum.

  • create FLOAT

    Create a FLOAT from a STRING widget. The input string must be a valid floating-point number and will be directly converted to a FLOAT without any further processing.

  • divide

    Divides one floating-point number by another. This node takes two floats as input and returns the result of division. It raises a ValueError if the divisor is 0.

  • divide (zero safe)

    Divides one floating-point number by another. This node takes two floats as input and returns the result of the division. It returns positive or negative infinity if the divisor is 0 (assumed to be +0.0).

  • from hex

    Converts a hexadecimal string to its corresponding floating-point number. This node takes a hexadecimal float string as input and returns the float.

  • integer ratio

    Returns the integer ratio of a floating-point number. This node takes a floating-point number and returns two integers, which represent the ratio as numerator and denominator.

  • is integer

    Checks if a floating-point number is an integer. This node takes a floating-point number as input and returns True if the number is an integer, otherwise False.

  • multiply

    Multiplies two floating-point numbers. This node takes two floats as input and returns their product.

  • power

    Raises one floating-point number to the power of another. This node takes two floats as input and returns the result of raising the first float to the power of the second.

  • round

    Rounds a floating-point number to the specified number of decimal places. This node takes a float and an integer for decimal places as inputs, and returns the rounded result.

  • subtract

    Subtracts one floating-point number from another. This node takes two floats as input and returns the result of subtracting the second float from the first.

  • to hex

    Converts a floating-point number to its hexadecimal representation. This node takes a float as input and returns its hexadecimal string representation.

Basic/flow control

  • continue flow

    Conditionally enable or disable a flow. This node takes a value and either passes it through or blocks execution based on the 'select' parameter. When 'select' is True, the value passes through; when False, execution is blocked. When a `message` is provided ComfyUI will display it in a dialog. Leave it empty for silent operation.

  • flow select

    Select the direction of the flow. This node takes a value and directs it to either the "true" or "false" output. Note: for dynamic switching in a Data Flow you might want to use "filter select" instead.

  • force calculation

    Forces recalculation of the connected nodes. This node passes the input directly to the output but prevents caching by marking itself as an output node and also indicates the out has changed. Use this when you need to ensure nodes are always recalculated.

  • force execution order

    Force execution order in the workflow. This node is lightweight and does not affect the workflow. It is used to force the execution order of nodes in the workflow. You only need to chain this node with the other execution order nodes in the desired order and add any output of the nodes you want to force execution order on. This node also passes through any input connected to "any node output" as its second output.

  • if/elif/.../else

    Implements a conditional branch (if/elif/else) in the workflow. This node takes a condition input and two value inputs. If the condition evaluates to True, the first value is returned; otherwise, the elif (else if) is evaluated and returned when true. This continues for all additional elifs. When none is true, the value of the else is returned. This allows conditional data flow in ComfyUI workflows.

  • if/else

    Implements a conditional branch (if/else) in the workflow. This node takes a condition input and two value inputs. If the condition evaluates to True, the first value is returned; otherwise, the second value is returned. This allows conditional data flow in ComfyUI workflows.

  • is connected

    Checks if the input is connected. This node returns True if the 'input' is connected to another node's output, and False otherwise.

  • switch/case

    Implements a switch/case selection in the workflow. This node takes a selector input (an integer) and multiple case value inputs. It returns the value corresponding to the provided index. If the index is out of range, the default value is returned. This allows for selection from multiple options based on a computed index. NOTE: This version of the node will most likely be deprecated in the future.

Basic/INT

  • add

    Adds two integers. This node takes two integers as input and returns their sum.

  • bit count

    Returns the number of 1 bits in the binary representation of an integer. This node takes an integer as input and returns the count of set bits.

  • bit length

    Returns the number of bits required to represent an integer in binary. This node takes an integer as input and returns the number of bits needed to represent it, excluding the sign and leading zeros.

  • create INT

    Create an INT from a STRING widget. The input string must be a valid integer number and will be directly converted to an INT without any further processing. Strings starting with "0b" are interpreted as binary numbers, "0o" as octal numbers, and "0x" as hexadecimal numbers. Note: This doesn't handle ones' complement as the data size is unknown.

  • divide

    Divides one integer by another. This node takes two integers as input and returns the result of integer division. It raises a ValueError if the divisor is 0.

  • divide (zero safe)

    Divides one integer by another. This node takes two integers as input and returns the result of the integer division. It returns the positive or negative infinity value if the divisor is 0.

  • from bytes

    Converts a bytes object to an integer. This class method takes bytes, byte order, and signed flag as inputs and returns an integer.

  • modulus

    Returns the modulus of two integers. This node takes two integers as input and returns the remainder when the first integer is divided by the second.

  • multiply

    Multiplies two integers. This node takes two integers as input and returns their product.

  • power

    Raises one integer to the power of another. This node takes two integers as input and returns the result of raising the first integer to the power of the second.

  • subtract

    Subtracts one integer from another. This node takes two integers as input and returns the result of subtracting the second integer from the first.

  • to bytes

    Converts an integer to its byte representation. This node takes an integer, byte length, and byte order as inputs and returns the bytes object representation of the integer.

Basic/LIST

  • append

    Adds an item to the end of a LIST. This node takes a LIST and any item as inputs, then returns a new LIST with the item appended to the end.

  • contains

    Checks if a LIST contains a specified value. This node takes a LIST and a value as inputs, then returns True if the value is present in the LIST, and False otherwise.

  • convert to Data List

    Converts a LIST object into a ComfyUI data list. This node takes a LIST object (Python list as a single variable) and converts it to a ComfyUI data list, allowing its items to be processed individually by nodes that accept data lists.

  • convert to SET

    Converts a LIST into a SET. This node takes a LIST input and creates a new SET containing all unique elements from the LIST, removing any duplicates.

  • count

    Counts the number of occurrences of a value in a LIST. This node takes a LIST and a value as inputs, then returns the number of times the value appears in the LIST.

  • create LIST

    Creates a new LIST from items. This node creates and returns a LIST. The list of items is dynamically extended based on the number of inputs provided.

  • create LIST from BOOLEANs

    Creates a new LIST from BOOLEAN items. This node creates and returns a LIST. The list of items is dynamically extended based on the number of inputs provided.

  • create LIST from FLOATs

    Creates a new LIST from FLOAT items. This node creates and returns a LIST. The list of items is dynamically extended based on the number of inputs provided.

  • create LIST from INTs

    Creates a new LIST from INT items. This node creates and returns a LIST. The list of items is dynamically extended based on the number of inputs provided.

  • create LIST from STRINGs

    Creates a new LIST from STRING items. This node creates and returns a LIST. The list of items is dynamically extended based on the number of inputs provided.

  • extend

    Extends a LIST by appending elements from another LIST. This node takes two LIST objects as input and returns a new LIST that contains all elements from both lists.

  • first

    Returns the first element in a LIST. This node takes a LIST as input and returns the first element of the list. If the LIST is empty, it returns None.

  • get item

    Retrieves an item at a specified position in a LIST. This node takes a LIST and an index as inputs, then returns the item at the specified index. Negative indices count from the end of the LIST. Out of range indices return None.

  • index

    Returns the index of the first occurrence of a value in a LIST. This node takes a LIST and a value as inputs, then returns the index of the first occurrence of the value. Optional start and end parameters limit the search to a slice of the LIST. Returns -1 if the value is not present.

  • insert

    Inserts an item at a specified position in a LIST. This node takes a LIST, an index, and any item as inputs, then returns a new LIST with the item inserted at the specified index.

  • last

    Returns the last element in a LIST. This node takes a LIST as input and returns the last element of the list. If the LIST is empty, it returns None.

  • length

    Returns the number of items in a LIST. This node takes a LIST as input and returns its length as an integer.

  • max

    Returns the maximum value in a LIST. This node takes a LIST of comparable items and returns the maximum value. Returns None if the LIST is empty or if items are not comparable.

  • min

    Returns the minimum value in a LIST. This node takes a LIST of comparable items and returns the minimum value. Returns None if the LIST is empty or if items are not comparable.

  • pop

    Removes and returns an item at a specified position in a LIST. This node takes a LIST and an index as inputs, then returns both the new LIST with the item removed and the removed item. If no index is specified, removes and returns the last item. When the LIST is empty, the item is None.

  • pop random

    Removes and returns a random element from a LIST. This node takes a LIST as input and returns the LIST with the random element removed and the removed element itself. If the LIST is empty, it returns None for the element.

  • range

    Creates a LIST containing a sequence of numbers. This node generates a LIST of numbers similar to Python's range() function. It takes start, stop, and step parameters to define the sequence.

  • remove

    Removes the first occurrence of a specified value from a LIST. This node takes a LIST and a value as inputs, then returns a new LIST with the first occurrence of the value removed and a success indicator. If the value is not present, the original LIST is returned with success set to False.

  • reverse

    Reverses the order of items in a LIST. This node takes a LIST as input and returns a new LIST with the items in reversed order.

  • set item

    Sets an item at a specified position in a LIST. This node takes a LIST, an index, and a value, then returns a new LIST with the item at the specified index replaced by the value.

  • shuffle

    Shuffles the items in a list using a seed for reproducibility. This node takes a LIST and a seed as input and returns a new shuffled LIST.

  • slice

    Creates a slice of a LIST. This node takes a LIST and start/stop/step parameters, and returns a new LIST containing the specified slice of the original LIST.

  • sort

    Sorts the items in a LIST. This node takes a LIST as input and returns a new sorted LIST. Option includes sorting in reverse order.

Basic/maths

  • abs

    Returns the absolute value of a number. This node takes a number and returns its absolute value (magnitude without sign).

  • acos

    Calculates the arc cosine (inverse cosine) of a value. This node takes a value between -1 and 1, and returns the arc cosine in radians or degrees. The arc cosine is the inverse operation of cosine, returning the angle whose cosine is the input value.

  • asin

    Calculates the arc sine (inverse sine) of a value. This node takes a value between -1 and 1, and returns the arc sine in radians or degrees. The arc sine is the inverse operation of sine, returning the angle whose sine is the input value.

  • atan

    Calculates the arc tangent (inverse tangent) of a value. This node takes a value and returns the arc tangent in radians or degrees. The arc tangent is the inverse operation of tangent, returning the angle whose tangent is the input value.

  • atan2

    Calculates the arc tangent of y/x, considering the quadrant. This node takes y and x coordinates and returns the arc tangent in radians or degrees. Unlike atan(y/x), this function handles the case where x is zero and correctly determines the quadrant of the resulting angle.

  • ceil

    Returns the ceiling of a number. This node takes a number and returns the smallest integer greater than or equal to the input value.

  • cos

    Calculates the cosine of an angle in radians or degrees. This node takes an angle value and unit type, and returns the cosine of that angle. The cosine of an angle is the ratio of the length of the adjacent side to the length of the hypotenuse in a right-angled triangle.

  • degrees

    Converts an angle from radians to degrees. This node takes an angle in radians and returns the equivalent angle in degrees.

  • e (2.71828)

    Returns the mathematical constant e. This node returns the value of e (Euler's number), which is approximately 2.71828.

  • exp

    Calculates the exponential of a number (e^x). This node takes a number and returns e (Euler's number) raised to the power of that number.

  • floor

    Returns the floor of a number. This node takes a number and returns the largest integer less than or equal to the input value.

  • formula

    A node that evaluates a mathematical formula provided as a string without using eval. This node takes an arbitrary number of numerical inputs (single letters like `a`, `b`, `c`, etc.) and safely evaluates the formula with supported operations: +, -, *, /, //, %, **, parentheses, and mathematical functions. NOTE on Operator Precedence: This parser uses standard precedence rules. Unary minus binds tightly, so expressions like `-a ** 2` are interpreted as `(-a) ** 2`. To calculate `-(a ** 2)`, use parentheses: `-(a ** 2)`. The identifiers `e` and `pi` are special. When used as a function call (`e()`, `pi()`), they return their respective mathematical constants. When used as a variable (`e`), they expect a corresponding input. Supported functions: - Basic: abs, floor, ceil, round, min(a,b), max(a,b) - Trigonometric: sin, cos, tan, asin, acos, atan, atan2(y,x), degrees, radians - Hyperbolic: sinh, cosh, tanh, asinh, acosh, atanh - Exponential & Logarithmic: exp, log, log10, log2, sqrt, pow(base,exp) - Constants (must be called with empty parentheses): pi(), e()

  • log

    Calculates the natural logarithm (base e) of a number. This node takes a positive number and returns its natural logarithm. If the specified base is not 'e', calculates the logarithm with the specified base.

  • log10

    Calculates the base-10 logarithm of a number. This node takes a positive number and returns its base-10 logarithm.

  • max

    Returns the maximum value among the inputs. This node takes two or more values and returns the maximum value among them. The function works with both FLOAT and INT types.

  • min

    Returns the minimum value among the inputs. This node takes two or more values and returns the minimum value among them. The function works with both FLOAT and INT types.

  • pi (3.14159)

    Returns the mathematical constant π (pi). This node returns the value of π, which is approximately 3.14159.

  • radians

    Converts an angle from degrees to radians. This node takes an angle in degrees and returns the equivalent angle in radians.

  • sin

    Calculates the sine of an angle in radians or degrees. This node takes an angle value and unit type, and returns the sine of that angle. The sine of an angle is the ratio of the length of the opposite side to the length of the hypotenuse in a right-angled triangle.

  • sqrt

    Calculates the square root of a non-negative number. This node takes a non-negative number and returns its square root.

  • tan

    Calculates the tangent of an angle in radians or degrees. This node takes an angle value and unit type, and returns the tangent of that angle. The tangent of an angle is the ratio of the length of the opposite side to the length of the adjacent side in a right-angled triangle.

Basic/SET

  • add

    Adds an item to a SET. This node takes a SET and any item as inputs, then returns a new SET with the item added. If the item is already present, the SET remains unchanged.

  • all

    Checks if all elements in the SET are true. This node takes a SET as input and returns True if all elements in the SET evaluate to True (or if the SET is empty), and False otherwise.

  • any

    Checks if any element in the SET is true. This node takes a SET as input and returns True if at least one element in the SET evaluates to True, and False otherwise (including if the SET is empty).

  • contains

    Checks if a SET contains a specified value. This node takes a SET and a value as inputs, then returns True if the value is present in the SET, and False otherwise.

  • convert to Data List

    Converts a SET object into a ComfyUI data list. This node takes a SET object (Python set as a single variable) and converts it to a ComfyUI data list, allowing its items to be processed individually by nodes that accept data lists.

  • convert to LIST

    Converts a SET into a LIST. This node takes a SET input and creates a new LIST containing all elements from the SET. Note that the order of elements in the resulting LIST is arbitrary since SETs are unordered collections.

  • create SET

    Creates a new SET from items. This node creates and returns a SET. The list of items is dynamically extended based on the number of inputs provided.

  • create SET from BOOLEANs

    Creates a new SET from items. This node creates and returns a SET. The list of items is dynamically extended based on the number of inputs provided.

  • create SET from FLOATs

    Creates a new SET from items. This node creates and returns a SET. The list of items is dynamically extended based on the number of inputs provided.

  • create SET from INTs

    Creates a new SET from items. This node creates and returns a SET. The list of items is dynamically extended based on the number of inputs provided.

  • create SET from STRINGs

    Creates a new SET from items. This node creates and returns a SET. The list of items is dynamically extended based on the number of inputs provided.

  • difference

    Returns the difference between two SETs. This node takes two SETs as input and returns a new SET containing elements in the first SET but not in the second SET.

  • discard

    Removes an item from a SET if it is present. This node takes a SET and any item as inputs, then returns a new SET with the item removed. Unlike remove, no error is raised if the item is not present.

  • enumerate

    Enumerates elements in a SET. This node takes a SET as input and returns a LIST of tuples where each tuple contains an index and a value from the SET. The start parameter specifies the initial index value (default is 0). Note: Since SETs are unordered, the enumeration order is arbitrary but consistent within a single operation.

  • intersection

    Returns the intersection of two or more SETs. This node takes multiple SETs as input and returns a new SET containing only elements present in all input SETs.

  • is disjoint

    Checks if two SETs have no elements in common. This node takes two SETs as input and returns True if they have no elements in common.

  • is subset

    Checks if set1 is a subset of set2. This node takes two SETs as input and returns True if set1 is a subset of set2 (all elements in set1 are also in set2).

  • is superset

    Checks if set1 is a superset of set2. This node takes two SETs as input and returns True if set1 is a superset of set2 (set1 contains all elements in set2).

  • length

    Returns the number of items in a SET. This node takes a SET as input and returns its length (number of elements) as an integer.

  • pop

    Removes and returns an arbitrary item from a SET. This node takes a SET as input and returns both the new SET with an arbitrary item removed and the removed item. When the SET is empty, the item is None.

  • pop random

    Removes and returns a random element from a SET. This node takes a SET as input and returns the SET with a random element removed and the removed element itself. If the SET is empty, it returns None for the element.

  • remove

    Removes an item from a SET. This node takes a SET and any item as inputs, then returns a new SET with the item removed and a success indicator. If the item is not present, the original SET is returned with success set to False.

  • sum

    Calculates the sum of all elements in a SET. This node takes a SET as input and returns the sum of all its elements. The optional start parameter specifies the initial value (default is 0). Note: This operation requires all elements to be numeric or otherwise compatible with addition. If the SET contains mixed or incompatible types, it may raise an error.

  • symmetric difference

    Returns the symmetric difference between two SETs. This node takes two SETs as input and returns a new SET containing elements in either SET but not in both.

  • union

    Returns the union of two or more SETs. This node takes multiple SETs as input and returns a new SET containing all elements from all the input SETs.

Basic/STRING

  • capitalize

    Converts the first character of the input string to uppercase and all other characters to lowercase.

  • casefold

    Converts text to lowercase in a way optimized for case-insensitive comparisons. This node is especially useful when comparing text that might contain special characters. Unlike standard lowercase, this handles special cases like converting the German 'ß' to "ss". Use this node when you need the most accurate case-insensitive text matching.

  • center

    Centers text within a specified width. This node takes a string and centers it within a field of the specified width. By default, it uses spaces as padding characters, but you can specify any single character to use as padding.

  • concat

    Combines two text strings together, joining them end-to-end.

  • count

    Counts occurrences of a substring within a string. This node returns the number of times the specified substring appears in the input string. You can optionally specify start and end positions to limit the search range.

  • endswith

    Checks if a string ends with the specified suffix. This node tests whether the input string ends with a particular substring. Returns True if the string ends with the specified suffix, otherwise False. Optional start and end parameters allow you to check only a specific portion of the string.

  • escape

    Escapes a string by converting special characters to escape sequences. This node converts characters like newlines, tabs, quotes, and backslashes to their escaped representation (like ' ', ' ', '"', '\'). Useful when you need to prepare strings for formats that require escaped sequences instead of literal special characters.

  • expandtabs

    Replaces tab characters with spaces. This node replaces all tab characters (' ') in a string with spaces. The tab size (number of spaces per tab) can be adjusted, with a default value of 8 characters.

  • find

    Finds the first occurrence of a substring in a string. This node searches for the first occurrence of the specified substring within the input string. Returns the lowest index where the substring is found. If the substring is not found, it returns -1. Optional start and end parameters allow you to limit the search to a specific portion of the string.

  • format_map

    Formats a string using values from a dictionary. This node replaces placeholders in the input string with values from a dictionary. It uses the same placeholder syntax as the format() method, but takes the values from a dictionary mapping keys to values. For example, the string "Hello, {name}" with a dictionary {"name": "World"} would produce "Hello, World".

  • in (contains)

    Checks if a string contains a specified substring. This node implements the 'in' operator for strings. It checks whether the given substring exists within the input string. Returns True if the substring is found, otherwise False.

  • join (from data list)

    Joins strings from a data list with a specified separator. This node takes a data list of strings and concatenates them, with the specified separator string between each element. The separator is inserted between the strings, not at the beginning or end of the result.

  • join (from LIST)

    Joins strings from a LIST with a specified separator. This node takes a data list of strings and concatenates them, with the specified separator string between each element. The separator is inserted between the strings, not at the beginning or end of the result.

  • length

    Returns the length of a string. This node calculates and returns the number of characters in the input string. It works the same way as Python's built-in len() function for strings.

  • ljust

    Left-aligns the string within a field of a given width. This node returns a string left-aligned in a field of the specified width. If fillchar is provided, it is used as the padding character instead of a space.

  • lower

    Converts the string to lowercase. This node returns a copy of the string with all uppercase characters converted to lowercase.

  • lstrip

    Removes leading characters from the string. This node returns a copy of the string with leading characters removed. If chars is provided, it specifies the set of characters to be removed. If chars is not provided, whitespace characters are removed.

  • removeprefix

    Removes prefix from the string if present. This node returns a copy of the string with the specified prefix removed if the string starts with that prefix, otherwise returns the original string.

  • removesuffix

    Removes suffix from the string if present. This node returns a copy of the string with the specified suffix removed if the string ends with that suffix, otherwise returns the original string.

  • replace

    Replaces occurrences of a substring with another substring. This node returns a copy of the string with all occurrences of substring old replaced by new. If the optional argument count is given, only the first count occurrences are replaced.

  • rfind

    Finds the highest index of the substring in the string. This node searches for the last occurrence of the specified substring within the input string. Returns the highest index where the substring is found. If the substring is not found, it returns -1. Optional start and end parameters allow you to limit the search to a specific portion of the string.

  • rjust

    Right-aligns the string within a field of a given width. This node returns a string right-aligned in a field of the specified width. If fillchar is provided, it is used as the padding character instead of a space.

  • rsplit (from data list)

    Splits the string at the specified separator from the right. This node returns a list of strings by splitting the input string at the specified separator, starting from the right. If maxsplit is provided, at most maxsplit splits are done. If the separator is not specified or is None, any whitespace string is a separator. Creates a data list of strings.

  • rsplit (from LIST)

    Splits the string at the specified separator from the right. This node returns a list of strings by splitting the input string at the specified separator, starting from the right. If maxsplit is provided, at most maxsplit splits are done. If the separator is not specified or is None, any whitespace string is a separator. Creates a LIST of strings.

  • rstrip

    Removes trailing characters from the string. This node returns a copy of the string with trailing characters removed. If chars is provided, it specifies the set of characters to be removed. If chars is not provided, whitespace characters are removed.

  • split (to data list)

    Splits the string at the specified separator. This node splits the input string at the specified separator and returns a data list containing all parts. If maxsplit is provided, at most maxsplit splits are done. If the separator is not specified or is None, any whitespace string is a separator. Creates a data list of strings.

  • split (to LIST)

    Splits the string at the specified separator. This node splits the input string at the specified separator and returns a data list containing all parts. If maxsplit is provided, at most maxsplit splits are done. If the separator is not specified or is None, any whitespace string is a separator. Creates a LIST of strings.

  • splitlines (from data list)

    Splits the string at line boundaries. This node returns a list of the lines in the string, breaking at line boundaries. If keepends is True, line breaks are included in the resulting list. Creates a data list of strings.

  • splitlines (to LIST)

    Splits the string at line boundaries. This node returns a list of the lines in the string, breaking at line boundaries. If keepends is True, line breaks are included in the resulting list. Creates a LIST of strings.

  • startswith

    Checks if a string starts with the specified prefix. This node tests whether the input string starts with a particular substring. Returns True if the string starts with the specified prefix, otherwise False. Optional start and end parameters allow you to check only a specific portion of the string.

  • strip

    Removes leading and trailing characters from the string. This node returns a copy of the string with both leading and trailing characters removed. If chars is provided, it specifies the set of characters to be removed. If chars is not provided, whitespace characters are removed.

  • swapcase

    Swaps case of all characters in the string. This node returns a copy of the string with uppercase characters converted to lowercase and lowercase characters converted to uppercase.

  • title

    Converts the string to titlecase. This node returns a titlecased version of the string where words start with an uppercase character and the remaining characters are lowercase.

  • unescape

    Unescapes a string by converting escape sequences to their actual characters. This node converts escape sequences like ' ' (two characters) to actual newlines (one character), ' ' to tabs, '\' to backslashes, etc. Useful for processing strings where escape sequences are represented literally rather than interpreted.

  • upper

    Converts the string to uppercase. This node returns a copy of the string with all lowercase characters converted to uppercase.

  • zfill

    Pads the string with zeros on the left. This node returns a copy of the string left filled with ASCII '0' digits to make a string of length width. A leading sign prefix ('+'/'-') is handled by inserting the padding after the sign character rather than before.

Basic/STRING/is

  • isalnum

    Checks if all characters in the string are alphanumeric. This node returns True if all characters in the string are alphanumeric (letters or numbers) and there is at least one character, otherwise False.

  • isalpha

    Checks if all characters in the string are alphabetic. This node returns True if all characters in the string are alphabetic (letters) and there is at least one character, otherwise False.

  • isascii

    Checks if all characters in the string are ASCII characters. This node returns True if all characters in the string are in the ASCII character set and there is at least one character, otherwise False.

  • isdecimal

    Checks if all characters in the string are decimal characters. This node returns True if all characters in the string are decimal characters and there is at least one character, otherwise False. Decimal characters include digit characters and characters that can be used to form decimal numbers in various locales.

  • isdigit

    Checks if all characters in the string are digits. This node returns True if all characters in the string are digits and there is at least one character, otherwise False.

  • isidentifier

    Checks if the string is a valid identifier in Python. This node returns True if the string is a valid Python identifier, otherwise False. A valid identifier must start with a letter or underscore and can only contain letters, digits, or underscores.

  • islower

    Checks if all characters in the string are lowercase. This node returns True if all cased characters in the string are lowercase and there is at least one cased character, otherwise False.

  • isnumeric

    Checks if all characters in the string are numeric. This node returns True if all characters in the string are numeric and there is at least one character, otherwise False. Numeric characters include digit characters and characters that have the Unicode numeric value property.

  • isprintable

    Checks if all characters in the string are printable. This node returns True if all characters in the string are printable or the string is empty, otherwise False. Printable characters are those which are not control characters.

  • isspace

    Checks if all characters in the string are whitespace. This node returns True if all characters in the string are whitespace and there is at least one character, otherwise False.

  • istitle

    Checks if the string is titlecased. This node returns True if the string is titlecased and there is at least one character, otherwise False. A titlecased string has all words start with an uppercase character and continue with lowercase.

  • isupper

    Checks if all characters in the string are uppercase. This node returns True if all cased characters in the string are uppercase and there is at least one cased character, otherwise False.

Basic/STRING/regex

  • find all (data list)

    Returns all non-overlapping matches of a pattern in the string as a list of strings.

  • find all (LIST)

    Returns all non-overlapping matches of a pattern in the string as a list of strings.

  • search groups (data list)

    Searches the string for a match to the pattern and returns a LIST of match groups. If no match is found, it returns an empty LIST.

  • search groups (LIST)

    Searches the string for a match to the pattern and returns a data list of match groups. If no match is found, it returns an empty data list.

  • search named groups

    Searches the string with the given pattern and returns a DICT of named groups. If no match is found, it returns an empty DICT.

  • split (data list)

    Splits the string at each match of the pattern and returns a list of substrings.

  • split (LIST)

    Splits the string at each match of the pattern and returns a list of substrings.

  • substitute

    Substitutes matches of the pattern in the string with a replacement string.

  • test

    Tests whether a given regex pattern matches any part of the input string. Returns True if a match is found, otherwise False.

Basic/tensor

  • Tensor Binary Op

    Performs binary operations between two tensors or a tensor and a scalar.

  • Tensor Create

    Creates a PyTorch tensor from various input types. Can accept numbers, lists, or existing tensors.

  • Tensor Info

    Returns information about a tensor.

  • Tensor Join

    Joins multiple tensors (concatenate or stack).

  • Tensor Permute

    Permutes tensor dimensions.

  • Tensor Reshape

    Reshapes a tensor.

  • Tensor Slice

    Slices a tensor using a slice string (e.g., ':, 0:10, 5').

  • Tensor Unary Op

    Performs unary operations on a tensor.

Basic/time

  • Add Time Delta

    Adds a TIMEDELTA (duration) to a DATETIME object, resulting in a new DATETIME.

  • Create Time Delta

    Creates a TIMEDELTA object, which represents a duration and can be used for date calculations.

  • Extract Time Components

    Extracts individual components (year, month, day, hour, etc.) from a DATETIME object. Weekday is returned as an integer, where Monday is 0 and Sunday is 6.

  • Format Time String

    Formats a DATETIME object into a string using a specified format code. Common format codes: %Y (year), %m (month), %d (day), %H (hour), %M (minute), %S (second).

  • Parse Time String

    Parses a string containing a date and time into a DATETIME object, using a specified format code.

  • Subtract Time Delta

    Subtracts a TIMEDELTA (duration) from a DATETIME object, resulting in a new DATETIME.

  • Time Difference

    Calculates the difference between two DATETIME objects, returning a TIMEDELTA object.

  • Time Now

    Returns the current time and date as a DATETIME object. Note: Output changes for every run, providing a fresh timestamp each time.

  • Time Now (UTC)

    Returns the current time and date as a DATETIME object, in the UTC timezone. Note: Output changes for every run, providing a fresh timestamp each time.

  • Time to Unix Timestamp

    Converts a DATETIME object to a Unix timestamp (a float representing seconds since the epoch).

  • Unix Timestamp to Time

    Converts a Unix timestamp (float or int) to a DATETIME object.