Nodes/comfyui-niutonian-smart-image/Smart Panorama Stitch
ComfyUI Node

Smart Panorama Stitch

Panorama stitching that actually looks for features — not just overlap

By Niutonian·Created 7 months ago·Updated 7 months ago· 0
Smart Panorama Stitch
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • panorama_image
stitch_directionhorizontal
overlap_detectionauto
blend_modelinear
feature_detectorsift
match_confidence0.3
blend_strength0.5
crop_resulttrue
manual_overlap100

Most "stitch" nodes in ComfyUI are dumb pastes: they line images up by their edges and call it a panorama. Smart Panorama Stitch is the one node in the Niutonian Smart Image Suite that actually tries to be smart about it. In auto mode it detects keypoints in your overlapping photos, matches them, fits a homography, and warps the frames together - real photogrammetry-style stitching, not just edge-to-edge pasting.

The catch is that "real" here is doing a lot of work. This is the only node in the pack with a genuine extra dependency (OpenCV), and a couple of its fancier-looking controls are accepted but not actually wired up yet. Worth knowing before you reach for it.

How it works

Feed it image_1 through image_6 in shooting order - overlapping photos of a landscape, a room, a wide composition. With overlap_detection set to auto, it converts to OpenCV format and runs feature_detector (sift, orb, or akaze) on each pair, matches descriptors, applies the ratio test gated by match_confidence, then fits a homography with RANSAC and warps the previous result onto the next frame. If feature matching fails, it falls back to simple_blend_stitch - a plain overlap paste - rather than erroring, and logs a note to the console.

overlap_detectionmanual skips all of that and just does the overlap paste using manual_overlap (in pixels) with a linear alpha blend across the overlap zone. That's the right mode when your source images are clean, evenly-spaced renders rather than real photos with perspective.

Now the honest part. blend_mode offers linear, multiband, and feather, and there's a blend_strength slider and a crop_result toggle. As of the current release, none of those actually change the output - the code only ever does a simple linear blend, and blend_strength / crop_result are accepted but never read. So leave blend_mode on linear and don't hunt for multiband quality you won't get. On the bright side, the feature detection itself is genuine, and it's the difference between "photos shoved together" and "actually stitched."

Inputs that matter

  • stitch_direction - horizontal for landscapes, vertical for tall stacks.
  • overlap_detection - auto for photos with real overlap, manual for renders.
  • feature_detector - sift is the solid default; orb is faster, akaze is more robust to blur.
  • match_confidence - raise it toward 0.5 if you're getting false matches and warped results.
  • manual_overlap - only appears when overlap detection is manual.

Output is panorama_image, a single IMAGE that goes straight to a Save Image or into an upscale.

Installing and gotchas

Same clone as the rest of the suite:

cd ComfyUI/custom_nodes
git clone https://github.com/Niutonian/comfyui-niutonian-smart-image

Restart, find it under Niutonian/Image Processing. This is the one node whose requirements.txt actually means something extra: opencv-python is listed as an optional dependency for the feature detection. If you see ModuleNotFoundError: cv2, that's why - pip install opencv-python in your ComfyUI environment and restart. The other six nodes don't need it.

Realistic expectations: this is a hand-rolled, brand-new implementation (the pack's initial commit is from early 2026), not Hugin or cv2.createStitcher. For clean, well-overlapped source material it does the job nicely. For casually-shot phone panoramas with big exposure differences, you'll get better results from a dedicated tool - and the node will cheerfully fall back to a mediocre paste rather than tell you it struggled.

CategoryNiutonian/Image Processing

Inputs (14)

NameTypeDefaultDescription
stitch_directionCOMBOhorizontal2 options: horizontal, vertical
overlap_detectionCOMBOauto2 options: auto, manual
blend_modeCOMBOlinear3 options: linear, multiband, feather
feature_detectorCOMBOsift3 options: sift, orb, akaze
match_confidenceFLOAT0.30.1–1
blend_strengthFLOAT0.50.1–1
crop_resultBOOLEANtrue
manual_overlapoptINT10010–500
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE
image_6optIMAGE

Outputs (1)

NameTypeDescription
panorama_imageIMAGE