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.
kubakub canvas to work
- image
- canvas_plan
- mask
- image
- mask
- scope
◄aspect_modeerror►
◄pad_modereplicate►
◄resize_methodauto►
Categorykubakub/2d/regions/canvas
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The image to bring onto the work canvas (matrix, start image, reference or first frame). | |
| canvas_plan | KUBA_CANVAS_PLAN | From kubakub canvas plan. | |
| aspect_mode | COMBO | error | If the image's aspect differs from the target: error, center_crop, or pad (for references and first frames). Never stretch. |
| pad_mode | COMBO | replicate | What the model sees in the grid padding. |
| resize_method | COMBO | auto | Resize filter: auto = area when shrinking, lanczos when growing. |
| maskopt | MASK | Optional mask, resized and padded the same way as the image. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The image on the work canvas, padded to the model grid. |
| mask | MASK | The input mask on the work canvas (zeros if none). |
| scope | MASK | 1 = target canvas, 0 = padding. |