Nodes/comfyui_cv/Latent → CV Array
ComfyUI Node

Latent → CV Array

Unwraps a ComfyUI LATENT ({'samples': [B,C,H,W]}) back to a float ndarray [H,W,C] so it can be processed by OpenCV nodes. Channels move to the last axis. Values are kept as float32 - never quantized. This is the inverse of 'CV Array → Latent'.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
Latent → CV Array
  • latents
  • nparray
batch_index0
Categoryimage/CV/low-level

Inputs (2)

NameTypeDefaultDescription
latentsLATENTA LATENT dict with 'samples' tensor of shape [B,C,H,W]. The selected batch index is extracted and channels are moved to the last axis, yielding [H,W,C].
batch_indexINT00–4095Which latent of the batch to convert. Clamped to the batch size.

Outputs (1)

NameTypeDescription
nparrayNPARRAYFloat32 ndarray [H,W,C] (C = latent channels; 16 for qwen_image_vae, 4 for SD 1.5 / SDXL).