⚠️ CV ZeroStride Like
DANGER: this node emits a 0-STRIDE BROADCAST VIEW, not a real filled array. Outputs ONE backing element broadcast to the input's width/height (and channels), so it allocates almost nothing - the point is to skip allocating a full canvas that cv2 will immediately overwrite. It is ONLY safe as the `dst` of a cv2 node that writes its result into the array in place (cv2.randu, cv2.randn, cv2.accumulate, the drawing primitives, ...). NEVER use the output as a source image, mask, for previews, or convert it to a tensor: those read every element and will error or yield garbage (every row/column identical). The low-level wrapper copies it into a real contiguous array before cv2 runs, so cv2 always receives a legitimate array - the saving is only this node's own allocation.
- nparray
- nparray
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| nparray | NPARRAY,IMAGE,MASK | Only its width/height (and channels, if 'same as input') and dtype (if dtype is 'same as input') are used to size the broadcast view. 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. | |
| value | FLOAT | 0.00 | DANGER: this node emits a 0-STRIDE BROADCAST VIEW, not a real filled array. The single backing value broadcast to every pixel. cv2 overwrites it, so this only sets the view's dtype/shape, not the eventual content. |
| channels | COMBO | grayscale (single channel) | Mirrors CV Constant Like: single-channel, or replicate the input's channel count. |
| dtype | COMBO | uint8 | Element type of the view. 'same as input' takes the input array's dtype; otherwise pick an explicit one (uint8 matches CV Constant Like). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | DANGER: this node emits a 0-STRIDE BROADCAST VIEW, not a real filled array. 0-stride broadcast VIEW. Safe only as a cv2 dst that is overwritten. Not a normal array - do not read it as one. |