Nodes/ComfyUI_KubaNodes/kubakub canvas restore
ComfyUI Node

kubakub canvas restore

Bring a generated canvas back to the exact target: crop the grid padding, resize uniformly to the target size, trim extra video frames, check the size. Put a model upscaler (4x, SeedVR2) before it; any uniform scale of the padded or cropped canvas is accepted.

By kubakubkub·Created 15 days ago·Updated 3 days ago· 9
kubakub canvas restore
  • image
  • canvas_plan
  • mask
  • image
  • mask
◄resize_methodauto►
◄trim_framestrue►
Categorykubakub/2d/regions/canvas

Inputs (5)

NameTypeDefaultDescription
imageIMAGEThe generated (or upscaled) work canvas.
canvas_planKUBA_CANVAS_PLANThe same plan used for canvas to work.
resize_methodCOMBOautoFinal resize to the target: auto = area when shrinking, lanczos when growing.
trim_framesBOOLEANtrueVideo: drop the frames added by the model's frame rule.
maskoptMASKOptional mask on the work canvas, restored the same way.

Outputs (2)

NameTypeDescription
imageIMAGEThe image at the exact target size.
maskMASKThe mask at the target size (zeros if none).