ComfyUI Node
LayerUtility: CropByMask V4
CropByMask V4 - 智能裁剪节点 新增参数: - reuse_crop_box: 复用首次计算的 crop_box,视频处理时只计算一次,后续帧直接复用 - device: 选择 CPU 或 GPU 进行处理
LayerUtility: CropByMask V4
- image
- mask_image
- crop_box
- cropped_image
- cropped_mask
- crop_box
- box_preview
◄detect▾►
◄top_reserve20►
◄bottom_reserve20►
◄left_reserve20►
◄right_reserve20►
◄round_to_multiple▾►
◄reuse_crop_boxfalse►
◄deviceCPU►
CategoryRunningHub/LayerUtility
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| detect | COMBO | 3 options: mask_area, min_bounding_rect, max_inscribed_rect | |
| top_reserve | INT | 20-9999–9999 | — |
| bottom_reserve | INT | 20-9999–9999 | — |
| left_reserve | INT | 20-9999–9999 | — |
| right_reserve | INT | 20-9999–9999 | — |
| round_to_multiple | COMBO | 8 options: 8, 16, 32, 64, 128, 256, +2 | |
| reuse_crop_box | BOOLEAN | false | — |
| device | COMBO | CPU | 2 options: CPU, GPU |
| imageopt | IMAGE | — | |
| mask_imageopt | IMAGE | — | |
| crop_boxopt | BOX | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| cropped_image | IMAGE | — |
| cropped_mask | IMAGE | — |
| crop_box | BOX | — |
| box_preview | IMAGE | — |