M Int Max
Take the bigger number, every time
- max
The mirror image of the pack's min node: M Int Max takes a and b and returns the larger one, as an INT named max. It's a single comparison - a if a > b else b - and it earns its place with a single repeated need: flooring a value from below.
The patterns that keep coming up:
- Minimum sensible values. "Resolution, but at least 512" is
max(width, 512). Same for steps, batch size, tile size - any value where going too low is a different failure than going too high. - Two-source selection. When two branches of a graph each produce a candidate value and you want the larger - the more aggressive seed, the bigger margin -
maxis the explicit choice. - Building a clamp in two visible halves.
maxlifts the bottom, M Int Min caps the top. Some people find two named, individually-wired nodes easier to reason about than one combined clamp, and this pack gives you the option.
Inputs are signed 32-bit INT, defaults 0. Output is plain INT and composes with the pack's arithmetic: max around a computed value is the standard "scale, then enforce a floor" idiom.
It ships in ComfyUiNodes (repo Madlumi/ComfyUiNodes, author "Madanie"), a small personal grab-bag of integer math, string helpers, and workflow-glue nodes. Install via ComfyUI Manager - search "ComfyUiNodes" - or:
cd ComfyUI/custom_nodes
git clone https://github.com/Madlumi/ComfyUiNodes
Then restart ComfyUI. No pip requirements or model downloads. It's under Add Node → mnodes → int.
Look, max isn't exciting. It's one of those nodes that sits in the pack and quietly saves you the first time a formula hands you a 256px canvas when you meant 512. Pair it with M Int Min and you've built a full clamp from parts you can see.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| a | INT | 0-2147483648–2147483647 | — |
| b | INT | 0-2147483648–2147483647 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| max | INT | — |