A ComfyUI node pack containing nodes for basic programming logic.
FlowNodes is very WIP and early in development. If you encounter a problem, please create an issue.
- ComfyUI FlowNodes
- Table of contents
- Examples
- Flow
- Nodes
The counter counts up one number on each run, each run will re-execute all the required nodes.
Additional nodes used in the example:
- String and Int from Various ComfyUI Nodes by Type
- Show text from ComfyUI custom scripts
Flow is a connection, which can be used to force comfyUI to perform function operations in a certain order. Flow is a single ton None
value which can be passed through as optional input to enforce an order of operations.
A flow is started from one of the following:
- a node with flow output
- an
activate flow from any
node. (The input here is optional.)
Flows can be used in two ways
- As input, for a node which takes a flow, like some of the function nodes.
- As input for the
Merge flow (bottleneck)
node, this node makes sure the order is fixed, and can be used to repeat if the flow is repeated using arepeater
node. (For example, from Comfyui-custom-scripts)
(Screenshot was taken before flow nodes got styled)
If any nodes are missing from this list, please inform me by making an issue.
Condition nodes will behave differently depending on the condition's value.
Takes a boolean (condition) and a value. Two outputs: True, and False.
- True: if
true
, contains the input value, iffalse
, containsNone
- False: if
false
, contains the input value, iftrue
, containsNone
This node should be connected on the location of an optional
input, as otherwise, returning None
will cause errors.
Takes a boolean, and two values. If the boolean is True
, the first value will be outputted, if it's False
, the second value will be outputted.
Same as Switch (Bool)
, but instead of True
/False
, it's the numbers 0-9
Comparison nodes take multiple inputs, and perform a comparison between them, and output the result.
- Takes 2 inputs, and an operation.
- Returns the result of the operation on the two inputs.
Logic nodes take 1/2 boolean inputs, and return a boolean.
- Takes 2 booleans, and an operation
- Returns the result of the operation on the two inputs.
Math nodes take a few numerical inputs, and returns the result of the selected operation.
- Takes 2 inputs, and an operation.
- Returns the result of the operation on the two inputs.
Function nodes perform an operation on the inputs, and output the result. (Most similar to most other comfy nodes)
Takes a pattern and a string. Uses python regex. Returns an array containing the regex's matches.
Simple operations like +, -, *, and some functions. Except they are executed on any object.
Prints its input to console. This is mainly for debugging.
this node can be very unsafe because it executes user specified code. To check the code, look for imports. Nodes will automatically become red if they contain import statements.
Execute a python script, takes one input variable currently. Referred to in the code as input0
.
If a parameter stacker node is connected, the node can have multiple inputs, referred to as inputN where N is the number of the input.
example:
out = input0 # Output the input, this node will do nothing, just pass through.
This node lets you access the persistent dict. This is a dictionary which is available between runs. Note that it resets when the server is restarted. And it's not stored in the workflow. It's specifically for changing things between runs.
Convert nodes specifically convert from one data type to another.
Converts from one type to the selected type.
Create an empty object. Currently supports dicts and lists.
Convert a list (Items are executed separately when put into another node) to a batch (Items are all given at once, but the node needs to support it.)
This is most useful for reading/writing individual batch items using operation nodes. Or to give it as an input for a script node.
Uses no-cache, so it won't lead to unexpected results with caching.
Creates a python list containing the items. (Can be modified with write operation nodes, using flow is recommended in this case, merge flow after the last operation.)