Documentation Index
Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
Use this file to discover all available pages before exploring further.
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHubThe CropByBBoxes node extracts and resizes specific rectangular regions from an input image batch. It uses provided bounding box coordinates to define the area to crop from each image. The cropped regions are then resized to a specified output dimension, with options to either stretch the crop or pad it to preserve its original aspect ratio.
Inputs
| Parameter | Data Type | Required | Range | Description |
|---|---|---|---|---|
image | IMAGE | Yes | - | The input batch of images to crop. |
bboxes | BOUNDINGBOX | Yes | - | The list of bounding boxes defining the regions to crop. This input is forced, meaning it must be connected. |
output_width | INT | No | 64 - 4096 | The width each crop is resized to (default: 512). |
output_height | INT | No | 64 - 4096 | The height each crop is resized to (default: 512). |
padding | INT | No | 0 - 1024 | Extra padding in pixels added on each side of the bounding box before cropping (default: 0). |
keep_aspect | COMBO | No | "stretch""pad" | Whether to stretch the crop to fit the output size, or pad with black pixels to preserve its aspect ratio (default: “stretch”). |
Outputs
| Output Name | Data Type | Description |
|---|---|---|
image | IMAGE | All cropped and resized regions, stacked into a single image batch. |
Source fingerprint (SHA-256):
7524d629e61f5af2475f819bc9431d4f4173feb5ad59f9bcf81d822330fb3e22