ComfyUI Node
CV Stitch
Stitches a batch of images into a panorama (cv2.Stitcher). Runs cv2.Stitcher in a separate process so stitching can be interrupted mid-workflow. Accepts IMAGE, LATENT, or NPARRAY inputs via the polytype socket. For batch stitching (2+ images), provide the frames as a batched NPARRAY from 'Image Batch → CV Batch' (uint8 recommended so cv2 receives the correct dtype). A single IMAGE or LATENT frame produces no panorama (ERR_NEED_MORE_IMGS). Returns the stitched panorama, a status label, and a success flag for downstream branching - a failed stitch never halts the workflow.
CV Stitch
- images
- masks
- panorama
- status
- success
◄modeStitcher_PANORAMA►
◄registration_resol-1.00►
◄seam_estimation_resol-1.00►
◄compositing_resol-1.00►
◄pano_confidence_thresh1.00►
◄wave_correctiontrue►
◄interpolation_flagsINTER_LINEAR►
Categoryimage/CV/features
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | NPARRAY,IMAGE,MASK | Image batch to stitch. IMAGE/LATENT: frame 0 only. NPARRAY batch [B,H,W,C]: all B frames are stitched in order. Use 'Image Batch → CV Batch' to convert a ComfyUI IMAGE batch into a batched NPARRAY. 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. | |
| mode | COMBO | Stitcher_PANORAMA | Stitching mode: PANORAMA (default, general panoramas) or SCANS (scans/linear scenes). |
| registration_resol | FLOAT | -1.00-1–100 | Resolution in megapixels for the registration stage (feature detection + matching). -1 = opencv default (auto-selects based on image count). |
| seam_estimation_resol | FLOAT | -1.00-1–100 | Resolution in megapixels for seam estimation. -1 = opencv default (auto). Higher = more memory, lower speed. |
| compositing_resol | FLOAT | -1.00-1–100 | Resolution in megapixels for compositing/warping phase. -1 = opencv default (auto). Higher = more memory, sharper result. |
| pano_confidence_thresh | FLOAT | 1.000–10 | Confidence threshold for seam estimation. Higher values produce fewer, longer seams (simpler blends). OpenCV default is 1.0. |
| wave_correction | COMBO | true | Enable wave correction (horizontal drift compensation). Recommended for panoramas with rotational motion. |
| interpolation_flags | COMBO | INTER_LINEAR | Interpolation method used for the compositing warp. INTER_LINEAR (default) is fast and adequate for most panoramas; INTER_CUBIC or INTER_LANCZOS4 are sharper but slower. |
| masksopt | NPARRAY,MASK | Optional coverage mask batch (same B dim as the image batch, or a single mask shared by all frames). 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 (3)
| Name | Type | Description |
|---|---|---|
| panorama | NPARRAY | Stitched panorama (uint8 BGR). On failure returns a copy of the first input frame. |
| status | STRING | 'OK' or an error label returned by cv2.Stitcher.stitch(). |
| success | BOOLEAN | True when stitching succeeded (status == OK). Use with IfElse to branch on success/failure. |