LogicUtil_Min
Ceiling a value from above — the other half of a clamp
- input1
- input2
- *
LogicUtil_Min is the node you grab when a value must never exceed a ceiling. Two inputs, input1 and input2, and it returns the smaller one - Python's min() with a face on it. min(denoise, 0.8) means "no matter what the rest of the graph computes, don't let denoise blow past 0.8." That's the entire job, and it's a job every serious workflow needs.
Here's the confusion that gets everyone at least once: because it returns the smaller of two values, Min enforces a maximum. The node that enforces a minimum (a floor) is LogicUtil_Max. It reads backwards from intuition, so when people say "I need to clamp this from below," they reach for Min - and get a ceiling instead. Say it to yourself: Min = smaller = cap from above. Max = larger = floor from below.
How it works
Both inputs are typed * (the ComfyUI anything-wildcard), and the output keeps whatever type won. Numbers are the normal case, but Python's min() also works on strings - min("apple", "banana") returns "apple" - so you can technically pick the lexicographically-first string with it. Mixing types, though, produces either an error or nonsense, and the * type won't warn you, so keep the inputs consistent.
The strongest use is a proper bounded clamp built from the pair: min(max(x, floor), ceiling) - Max first to push above the floor, then Min to pull back under the ceiling. That two-node pattern is how you keep an automated value inside the range you know produces good output, which matters double in batch and animation pipelines where one runaway value ruins an entire set. The community's own advice - change one variable at a time, lock the rest - is exactly the discipline these clamp nodes make practical.
Like everything in the LogicUtil family, Min is a port of aria1th's ComfyUI-LogicUtils riding inside the JDCN pack, a utility grab-bag from Daxton Caylor and Jerry Davos that's better known for file and latent batch nodes. The README documents those and ignores this family, so the graph label LogicUtil_Min is the original class name with the pack prefix - and this page is effectively the docs.
Install
Install is the standard JDCN routine: ComfyUI Manager → "Install Custom Node" → search JDCN → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/daxcay/ComfyUI-JDCN
cd ComfyUI-JDCN && pip install -r requirements.txt
Only piexif on the requirements list, no models to fetch. And when your clamp mysteriously locks the value at the low end instead of the high end, you swapped Min and Max - swap them back and move on.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input1 | * | — | |
| input2 | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |