ComfyUI-LogicUtils
Logical Utils (compare, string, boolean operations) for ComfyUI
Nodes (153)
Strip the sign off a number, integer or float
Add Values (AddNode) — ComfyUI-LogicUtils
Base64 Decode to Image (Base64DecodeNode) — ComfyUI-LogicUtils
Turn an IMAGE into a base64 string for APIs and webhooks
Unwrap a base64 payload back to text
A one-slider brightness adjustment
Round any number up to the next whole integer
Auto-blur based on a booru rating classifier
Dial saturation up or down with a single factor
Compose RGBA Image From Mask (ComposeRGBAImageFromMask) — ComfyUI-LogicUtils
Stitch a whole image batch into one contact-sheet grid
Put two images side by side (or stacked) automatically
A one-slider contrast adjustment, no color-correct node needed
Convert to Boolean (ConvertAny2Boolean) — ComfyUI-LogicUtils
Force any wired value into a Python dict
Cast any value into a float
Force any wired value into a plain integer
Wrap anything into a Python list, mainly for loop nodes
Turn a wired value into a Python set
Convert to String (ConvertAny2String) — ComfyUI-LogicUtils
Build the tuple that loop nodes actually want
Turn a dropdown or list value into text
Drop an image to greyscale in one node
Convert RGB (ConvertRGBNode) — ComfyUI-LogicUtils
Counter Float (CounterFloat) — ComfyUI-LogicUtils
A value that counts up every time you run
The current date and time as a formatted string
A bare dropdown that hands back your pick as a string
Start a Python dict from scratch, right inside your graph
Pull one value out of a dict by key
Get a dict's key-value pairs as a list
List every key in a dict
Combine two dicts into one, with an in-place option
Hold a live reference to a dict across your graph
Delete one key from a dict and keep going
Write a key/value pair into a dict
Pull every value out of a dict as a list
Seeded aspect-ratio picker for batches
Divide (DivideNode) — ComfyUI-LogicUtils
Append text to a JSONL file, straight from your graph
Fail a ComfyUI run on purpose, with a message you actually wrote
Filter an image in frequency space, not pixel space
Strip specific tags out of a Danbooru-style tag string
Round any number down to the next whole integer
Auto-tag an image with the full Danbooru tag set
Tag an image without naming who's in it
Same character tagger, a name that oversells it
Find out which named character is in the image
Read width, height, and pixel count off an image
The one-line character counter this pack is built around
Classify an image by file path, for batch scripts
Find out if an image reads as safe, questionable, or explicit
Another tagger node whose name outruns its schema
The everyday Danbooru auto-tagger for a single image
Read back a value another node stashed earlier in the graph
Pull a value back out of the JSON file Global Var Save wrote
Clear a stashed value so the next run starts clean
Write a value to disk so it survives a ComfyUI restart
Initialize a value once, keep it across runs
Stash a value under a key to use elsewhere in the graph
Download Image from URL (ImageFromURLNode) — ComfyUI-LogicUtils
A straight negative, one input, one output
The node this entire pack started as a joke about
Dump whatever's actually inside a socket to text
Turn any Python object flowing through your graph into a string
Turn a JSON string into a live Python object
Add one item to the end of a list
The empty list every LogicUtils chain starts from
Merge two lists into one
Pull one item out of a list by index
Drop an item into a list at a specific spot
Remove an item and get the shortened list back
Delete an item by value, not position
A boolean AND gate for your ComfyUI graph
Masking bits together without leaving the graph
The bit-flip, not a boolean toggle
Combining integer flags without leaving the graph
Nudging an integer's bits, direction unconfirmed
The bit-level toggle
The lightweight two-number comparison people actually recommend
It's a regex match, not a plain substring check
Return A or B Value (LogicGateEither) — ComfyUI-LogicUtils
Flip whatever comes in
Flip a boolean (or a number's sign) inline
Combine two conditions into one clean boolean
Log (LogNode) — ComfyUI-LogicUtils
A poor man's dropdown for a handful of preset values
A poor man's dropdown for a handful of preset numbers
Pull one item out of a delimited string by index
Max (MaxNode) — ComfyUI-LogicUtils
A one-slot memory cell that survives between runs
Glue two node outputs into one string
Take the smaller of two values, no clamp node required
The remainder operator as a ComfyUI node
Multiply (MultiplyNode) — ComfyUI-LogicUtils
Read an image's embedded metadata back out as text
Raise one value to the power of another, type-agnostic
A seeded coin flip you can wire into your graph logic
The textbook ramp function, one float in and out
A seeded number drawn from a normal distribution
Shuffle a delimited list of numbers, seeded
Reorder a delimited list without changing what's in it
Shuffle a delimited list of strings, seeded
Regex find-and-replace on prompts and text
Snap dimensions to a clean multiple
Force an exact width and height
One number, aspect ratio kept
Downscale-only, skip if already small
Upscale-only, skip if already big enough
Fit an image inside a box, proportions intact
Multiply the dimensions by a factor
Scale an image by its shortest side, aspect ratio intact
Rotate an image by an angle in degrees
Round (RoundNode) — ComfyUI-LogicUtils
Write JPEGs with quality and metadata control
Save Image Custom Node (SaveImageCustomNode) — ComfyUI-LogicUtils
Write WebP with quality, compression and metadata control
Write any string to a file on disk
The same A1111-API bridge, for when the primary one won't run
Call an A1111/Forge instance's REST API from inside ComfyUI
Add one item to a Python set, ComfyUI-native
Reset a set back to empty without a new Set Create
Start an empty Python set inside your ComfyUI graph
What's in A that isn't in B
Find what two sets have in common
Drop one item from a Python set in ComfyUI
Everything that's in exactly one of two sets
The bridge back from SET to a type ComfyUI understands
Merge two sets, duplicates handled for free
A one-knob sharpen/blur for any image
Squash any number into 0–1
Pause execution, then pass anything through
An inline pause in the middle of a chain
A typed float constant
Static Number Int (StaticNumberInt) — ComfyUI-LogicUtils
A fixed text value as a wire
Split a delimited string and pick an item
Make any text ASCII-safe
System Random Float (SystemRandomFloat) — ComfyUI-LogicUtils
True random noise, no seed
System Random Int (SystemRandomInt) — ComfyUI-LogicUtils
A unique random string for filenames and IDs
A dead-simple debug window for whatever's flowing through your graph
Threshold Image (ThresholdNode) — ComfyUI-LogicUtils
Force a value into a real Python list
Dedupe a value into a Python set
Random, but weighted toward a target
A poor man's wildcard, one string wide
A seeded random number generator you can actually reproduce
Uniform Random Int (UniformRandomInt) — ComfyUI-LogicUtils
Pick from a list where some options are more likely than others
A counter that remembers where it left off between runs
Step through a list instead of picking randomly
Logic Utilities for someone who wants
~~prime list calculation in comfyui~~
Proper documentation is being prepared, however there are too many nodes
Tests
Run from the repo root:
python -m unittest discover -s tests
Notes
- Auto-install is opt-in via
COMFYUI_LOGICUTILS_AUTO_INSTALL=1. - To force-disable the install hook, set
COMFYUI_LOGICUTILS_SKIP_INSTALL=1.