OpenCV checkRange_1
CheckRange_1 — the duplicate debug node that still catches bad array values
- a
- bool
- literal
checkRange_1 is the exact twin of checkRange_0 - same inputs (a, quiet, minVal, maxVal), same outputs (bool plus literal), same behavior. The opencv-comfyui pack generates one node per type-definition overload, so MatLike and UMat variants land as functionally identical _0/_1 pairs. Nothing is gained by picking the _1. If you already read the _0 page, you can stop here - everything below is the recap for people who landed on this page first.
This is OpenCV's array range checker. It inspects every element of an nparray and returns whether they all fall within minVal..maxVal (both FLOAT inputs). The quiet (BOOLEAN) flag decides the failure mode: quiet on returns a boolean result instead of raising, which is what you want in a graph where a crash is less useful than a value you can wire into logic. Output bool tells you the verdict; literal carries the position of the first out-of-range element per the function's type definition.
Where you'd actually use it: this pack is full of operations with assumptions baked in - images as 0..255 uint8, or 0..1 floats - and when a value drifts out of range you often only notice several nodes downstream as a crash or silent garbage. Dropping checkRange on a wire, setting the expected bounds, and reading False tells you exactly where the chain broke. It's a debug tool, pure plumbing: touches no pixels, costs nothing to keep around, and is genuinely the right answer to "why is this node spitting nonsense."
Install is the same for every node in this pack - ComfyUI Manager, search "OpenCV", or:
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
pip install opencv-python-contrib
Restart, done, no model files. Remember the pack-wide conventions: NPARRAY in/out (BGR 0..255 uint8 on the OpenCV side), batch_size == 1 only, bridge from IMAGE with Image2Nparray. And the author's own framing applies to every node here, twins included: auto-generated, rough around the edges, "expect dragons." A duplicate debug node is the mildest dragon you'll meet - and honestly, one that only reports the truth.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| a | NPARRAY | — | |
| quiet | BOOLEAN | — | |
| minVal | FLOAT | — | |
| maxVal | FLOAT | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| bool | BOOLEAN | — |
| literal | STRING | — |