ComfyUI Node
CV Cast Array
Converts an ndarray to another element type, saturating like cv2.convertTo: values are rounded and clipped to the target range instead of wrapping around. cv2 arithmetic (add, multiply, compare...) refuses mixed types - e.g. int32 connected-component labels cannot be added to a uint8 mask without casting one side first.
CV Cast Array
- nparray
- nparray
◄dtypeuint8►
Categoryimage/CV/low-level
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| nparray | NPARRAY | Array to convert; values survive, only the element type changes. | |
| dtype | COMBO | uint8 | Target element type. Integer targets round and clip (saturate); float targets convert values as-is. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |