ComfyUI Node

Minimum

The Ceiling You Slap on Values Before They Break Something

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Minimum
  • values
  • MATCHTYPE

UC_MathMin returns the smallest of the numbers you connect to it. It's the "never more than this" node, and in a tool where a runaway computed value can send a resolution to an absurd size or a batch count to something your VRAM laughs at, a ceiling is often exactly what a workflow needs.

Why you'd reach for it

The honest use is upper-bound protection. min(computed, 1024) caps a dimension at 1024 no matter what the math upstream produces - the mirror image of max's "at least" floor. It's also a genuine picker: when a value could come from several sources and you want the smallest of them (the tightest crop margin, the least aggressive strength, the smaller of two reference sizes), min picks it in one node. In parametric workflows where you've converted widgets to inputs, it's the cheap way to keep a whole family of downstream nodes honest.

How it works

Same shape as UC_MathMax: an autogrow values socket that grows from 2 up to 10 connections, a plain min() over them, and a MatchType output that mirrors the input type. Ints in, int out; introduce a float and the result is a float. That type-following behavior means no conversion node between this and whatever consumes it.

The input that matters

values. Wire in the computed value and your constant ceiling, and you're done. The output is a single socket, ready to feed a resolution, step count, or strength.

Installing it

It's in ComfyUI-UtilsCollection. ComfyUI Manager → search "ComfyUI-UtilsCollection" → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart. No models; requirements are just opencv-python and typing-extensions.

The one thing to keep straight

Min caps up - it's an upper bound. The pair is easy to invert: min(x, 1024) means "never exceed 1024," max(x, 512) means "never go below 512." Beginners mix these up constantly, and the symptom is a workflow that quietly does the opposite of the label you thought you attached. Put min and max around the same value and you've built a clamp - which this pack also ships as a dedicated UC_MathClamp if you want it in one node instead of two. And if you came from ComfyUI-LogicMath, this replaces its min node: accept the swap and uninstall the old pack to avoid duplicates.

Categoryutils/math

Inputs (1)

NameTypeDefaultDescription
valuesCOMFY_AUTOGROW_V3

Outputs (1)

NameTypeDescription
MATCHTYPECOMFY_MATCHTYPE_V3