ComfyUI Node
Image Batch → CV Batch
Converts an entire ComfyUI IMAGE/MASK/LATENT batch to a single batched NPARRAY (e.g. [B,H,W,C]) so every frame can be processed in one cv2 call without per-frame looping. IMAGE becomes [B,H,W,C] BGR (float32 by default to avoid uint8 quantisation and overflow clamping); LATENT becomes [B,C,H,W] float32 with values untouched; MASK becomes [B,H,W] float32 0..1. Pair with 'CV Batch → Image' (or 'Latent → CV Array') to convert back. The output is a RAW NPARRAY — no automatic type preservation.
Image Batch → CV Batch
- input
- batch
◄dtypefloat32 (0-1, no quantisation)►
Categoryimage/CV/low-level
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| input | IMAGE,MASK,LATENT,NPARRAY | IMAGE, MASK, LATENT or NPARRAY batch to convert. The entire batch is extracted (no batch_index). | |
| dtype | COMBO | float32 (0-1, no quantisation) | For IMAGE/MASK: float32 keeps the original precision (no [0,1]→[0,255] quantisation and no overflow clamping on add/multiply); uint8 matches the standard cv2 path. For LATENT this is ignored (always float32). For NPARRAY the value passes through as-is. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| batch | NPARRAY | Batched ndarray: [B,H,W,C] from IMAGE, [B,H,W] from MASK, [B,C,H,W] from LATENT, or the NPARRAY as-is. |