| image | NPARRAY,IMAGE | | Color image (BGR uint8); grabCut needs 3 channels - grayscale is converted. 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. |
| iterations | INT | 51–50 | GrabCut refinement iterations; 5 is usually plenty. |
| pointsopt | NPARRAY | | 2+ points whose bounding rectangle contains the object (Nx1x2 or Nx2). Everything outside the rectangle becomes sure background. |
| maskopt | NPARRAY,MASK | | Mask; non-zero = probable FOREGROUND (the rest stays probable background unless 'points' also marks a rectangle). The polygon mask of 'CV Annotate Points' plugs in directly. 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. |
| sure_foregroundopt | NPARRAY,MASK | | Scribble mask; non-zero pixels are forced to stay foreground. 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. |
| sure_backgroundopt | NPARRAY,MASK | | Scribble mask; non-zero pixels are forced to stay background. 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. |