ComfyUI Node
NB2 Crop
Crops the image to the mask region and scales to the exact Nano Banana 2 resolution. Set aspect_ratio and resolution to match NB2 Mask Generator. Pair with InpaintStitchNB2 after generation.
NB2 Crop
- image
- mask
- stitcher
- cropped_image
- cropped_mask
◄aspect_ratio16:9►
◄resolution2K►
◄context_extend_factor1.00►
◄downscale_algorithmbilinear►
◄upscale_algorithmbicubic►
◄device_modegpu (much faster)►
Categoryinpaint/nb2
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| aspect_ratio | COMBO | 16:9 | Must match the aspect_ratio set in NB2 Mask Generator. |
| resolution | COMBO | 2K | Must match the resolution set in NB2 Mask Generator. |
| context_extend_factor | FLOAT | 1.001–4 | Grow the crop region by this factor in every direction before aspect-ratio adjustment. 1.0 = crop exactly the masked area. |
| downscale_algorithm | COMBO | bilinear | 6 options: nearest, bilinear, bicubic, lanczos, box, hamming |
| upscale_algorithm | COMBO | bicubic | 6 options: nearest, bilinear, bicubic, lanczos, box, hamming |
| device_mode | COMBO | gpu (much faster) | 2 options: gpu (much faster), cpu (compatible) |
| maskopt | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| stitcher | STITCHER | — |
| cropped_image | IMAGE | — |
| cropped_mask | MASK | — |