Nodes/ComfyUI_KubaNodes/kubakub canvas to work
ComfyUI Node

kubakub canvas to work

Bring an image (matrix, start image, reference or first frame) and an optional mask onto the planned work canvas: uniform resize to target / k, then pad to the model grid. scope is 1 on the real canvas and 0 on padding.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
kubakub canvas to work
  • image
  • canvas_plan
  • mask
  • image
  • mask
  • scope
◄aspect_modeerror►
◄pad_modereplicate►
◄resize_methodauto►
Categorykubakub/2d/regions/canvas

Inputs (6)

NameTypeDefaultDescription
imageIMAGEThe image to bring onto the work canvas (matrix, start image, reference or first frame).
canvas_planKUBA_CANVAS_PLANFrom kubakub canvas plan.
aspect_modeCOMBOerrorIf the image's aspect differs from the target: error, center_crop, or pad (for references and first frames). Never stretch.
pad_modeCOMBOreplicateWhat the model sees in the grid padding.
resize_methodCOMBOautoResize filter: auto = area when shrinking, lanczos when growing.
maskoptMASKOptional mask, resized and padded the same way as the image.

Outputs (3)

NameTypeDescription
imageIMAGEThe image on the work canvas, padded to the model grid.
maskMASKThe input mask on the work canvas (zeros if none).
scopeMASK1 = target canvas, 0 = padding.