ComfyUI Node
CV Array Shape
Reads the spatial dimensions and channel count of an IMAGE/MASK/LATENT/NPARRAY. For a [H,W] array or MASK channels=1; for [H,W,C] arrays channels=C. LATENT sizes count latent cells (pixels / VAE stride). Only the shape is inspected - no data is read or modified.
CV Array Shape
- nparray
- height
- width
- channels
- dsize
- size
Categoryimage/CV/low-level
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| nparray | NPARRAY,IMAGE,MASK,LATENT | Array whose shape to read. Only the shape is inspected regardless of dtype. LATENT sizes count latent cells. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| height | INT | Height (first spatial dimension). For LATENT inputs this counts latent cells (pixels / stride). |
| width | INT | Width (second spatial dimension). For LATENT inputs this counts latent cells. |
| channels | INT | Number of channels: 1 for 2-D arrays / MASK, C for [H,W,C] arrays / IMAGE / LATENT. |
| dsize | STRING | '(width, height)' literal, for the composite cv2 params that are still free-text. Prefer the 'size' output for a Size-typed input. |
| size | CV_TUPLE | (width, height) as ONE composite value - wire it straight into a cv2 node's dsize / ksize / winSize / imageSize input. Both components travel together, so the size can never arrive half-connected. |