| left | NPARRAY,IMAGE | | Left rectified frame (grayscaled internally). 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. |
| right | NPARRAY,IMAGE | | Right rectified frame; resized to left if the sizes differ. 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. |
| num_disparities | INT | 6416–512 | Disparity search range (0..num_disparities), rounded up to a multiple of 16. Larger covers nearer objects / wider baselines but is slower. |
| block_size | INT | 71–21 | Matched block size in pixels (forced odd; 3-11 is typical). Smaller = more detail but noisier. |
| min_disparity | INT | 0-256–256 | Smallest disparity to search from (usually 0). |
| mode | COMBO | SGBM (balanced) | SGBM is the standard; 3-way is faster at lower quality; HH runs the full-scale two-pass (best, slowest). |
| wls_lambda | FLOAT | 80000–100000 | Regularization strength: how strongly the filtered disparity is smoothed towards the edges of the left image. 8000 is the OpenCV-recommended default; larger = smoother, more hole filling, more bleeding across depth edges. |
| wls_sigma_color | FLOAT | 1.50–10 | How sensitive the filter is to left-image edges. 0.8-2.0 is the useful range: too low leaks disparity across object boundaries, too high makes it follow image noise. |
| uniqueness_ratioopt | INT | 100–100 | Margin (%) by which the best match must beat the runner-up to be accepted. |
| speckle_window_sizeopt | INT | 1000–1000 | Largest smooth disparity blob treated as speckle noise and invalidated (0 = off). |
| speckle_rangeopt | INT | 20–64 | Max disparity variation within a speckle component. |
| lrc_thresholdopt | FLOAT | 240–256 | Left-right consistency tolerance in 1/16 pixel units: disagreements above it are marked unconfident and re-filled by the filter. |
| depth_discontinuity_radiusopt | INT | 00–32 | Radius (px) around depth discontinuities used when computing confidence. 0 = the filter's own heuristic (block_size / 2). |
| disp12_max_diffopt | INT | -1-1–64 | SGBM's OWN left-right check, in pixels: matches that disagree by more than this are invalidated before the WLS filter ever sees them. -1 (cv2's default) turns it off and leaves occlusion junk in the map; 1 is the usual setting when the disparity feeds an interpolation or a point cloud. |