Nodes/ComfyUI_Swwan/LayerUtility: CropByMask V4
ComfyUI Node

LayerUtility: CropByMask V4

CropByMask V4 - 智能裁剪节点 新增参数: - reuse_crop_box: 复用首次计算的 crop_box,视频处理时只计算一次,后续帧直接复用 - device: 选择 CPU 或 GPU 进行处理

By aining2022·Created 9 months ago·Updated about a month ago· 27
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)

NameTypeDefaultDescription
detectCOMBO3 options: mask_area, min_bounding_rect, max_inscribed_rect
top_reserveINT20-9999–9999
bottom_reserveINT20-9999–9999
left_reserveINT20-9999–9999
right_reserveINT20-9999–9999
round_to_multipleCOMBO8 options: 8, 16, 32, 64, 128, 256, +2
reuse_crop_boxBOOLEANfalse
deviceCOMBOCPU2 options: CPU, GPU
imageoptIMAGE
mask_imageoptIMAGE
crop_boxoptBOX

Outputs (4)

NameTypeDescription
cropped_imageIMAGE
cropped_maskIMAGE
crop_boxBOX
box_previewIMAGE