Nodes/comfyui_cv/CV Permute Axes
ComfyUI Node

CV Permute Axes

Reorders an ndarray's axes (numpy moveaxis). The main use is converting an (H, W, C) image array into (C, H, W) for DNN blob input, or vice-versa. The 'source' axis is moved to the 'dest' position; all other axes keep their relative order.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
CV Permute Axes
  • nparray
  • nparray
source-1
dest0
Categoryimage/CV/low-level

Inputs (3)

NameTypeDefaultDescription
nparrayNPARRAYArray whose axes to permute.
sourceINT-1-4–4Axis to move FROM (-1 = last, e.g. the channel axis in an HWC image).
destINT0-4–4Axis to move TO (0 = first, e.g. making channels the leading dimension for NCHW).

Outputs (1)

NameTypeDescription
nparrayNPARRAYThe same data with axes reordered.