Nuke Reformat
Put any generation on a standard canvas with Nuke Reformat
- image
- IMAGE
Your model renders at whatever resolution it wants; your edit timeline doesn't care. ComfyUI has a thousand ways to make an image bigger, but almost none to park a frame onto a specific canvas - 1920x1080 exactly, black bars and all, without freeform guesswork. That's what Nuke Reformat is for: it's a faithful port of Nuke's Reformat node, and it turns "some image of arbitrary size" into "an image on the canvas I asked for," with Nuke's format presets, resize modes, and pixel-aspect handling built in. It ships in the nuke-nodes-comfyui pack alongside its merge, grade, and OCIO siblings.
Reach for it the moment you're compositing AI output with anything that has a defined frame - matching a batch of renders to 1080p footage before a merge, normalizing to a 2K_DCP or UHD_4K deliverable, or cleaning up before you hand frames to another model. It's the node that makes "different resolutions" a non-problem in your graph.
How it works
Three modes via type, each defining the output canvas:
to format- pick a named preset. There are 16 of Nuke's standard formats (HD_1080, UHD_4K, 2K_DCP, PAL, NTSC, Super 35 variants, squares...) plus your own saved ones.to box- define the canvas explicitly withbox_width,box_height,box_pixel_aspect.scale- just multiply the input size byscale(0.5 = half, 2.0 = double).
Then resize_type decides how the image gets fitted onto that canvas, in a pixel-aspect-aware way: width and height match one dimension and keep aspect, fit fits entirely inside (leaving bars), fill covers the whole canvas (cropping the overflow), distort stretches to fit, none does pure crop/pad with no resampling. center places the image on the canvas (off = Nuke's bottom-left origin alignment), flip/flop/turn handle orientation, and black_outside pads with black or replicates edge pixels.
The inputs that actually matter
typeandformatare the big two - for 90% of use, settypeto "to format", pickHD_1080, and pick yourresize_type.save_format_as- the hidden gem. Setformatto "custom", dial incustom_width/custom_height/custom_pixel_aspect, type a name here, and the format is persisted as JSON in your ComfyUI user directory and shows up in the dropdown after a frontend refresh - exactly like Nuke's "new..." format.input_pixel_aspect(optional) - ComfyUI tensors carry no format metadata, so the node assumes square pixels. If your source is anamorphic (PAL at 1.09, NTSC at 0.91), declare it here or the math is subtly wrong.
One output, an IMAGE tensor on the new canvas, ready to wire into a merge or save node.
Installing it
Same pack as the rest of the Nuke nodes - ComfyUI Manager (search "Nuke Nodes"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/sumitchatterjee13/nuke-nodes-comfyui.git nuke-nodes
cd nuke-nodes && pip install -r requirements.txt
Restart and it's under Nuke → Transform. Note that Reformat is one of the few nodes in this pack that genuinely needs OpenCV - it'll raise a clear error if cv2 isn't present. requirements.txt includes opencv-python-headless, so a normal install is fine.
Where people get burned
Two traps. First, the format-specific fields: the custom_* inputs only apply when type is "to format" and format is "custom", and the box_* inputs only apply when type is "to box" - set the wrong family and your numbers silently do nothing. Second, don't confuse this with upscaling: Reformat resamples with OpenCV interpolators (impulse = nearest, cubic, lanczos, area - area is the sensible downscale choice), so if your actual goal is more detail, a model-based upscaler will beat this every time. Reformat's job is canvas discipline, not quality. It just does that job very well.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| type | COMBO | to format | 3 options: to format, to box, scale |
| format | COMBO | HD_1080 | 17 options: PAL, NTSC, PAL_16:9, NTSC_16:9, HD_720, HD_1080, +11 |
| custom_width | INT | 19201–16384 | — |
| custom_height | INT | 10801–16384 | — |
| custom_pixel_aspect | FLOAT | 1.000.1–10 | — |
| save_format_as | STRING | When format is 'custom' and this is non-empty, the custom width/height/pixel aspect are saved under this name and appear in the format dropdown after a frontend refresh. | |
| box_width | INT | 19201–16384 | — |
| box_height | INT | 10801–16384 | — |
| box_pixel_aspect | FLOAT | 1.000.1–10 | — |
| scale | FLOAT | 1.000.01–100 | — |
| resize_type | COMBO | width | 6 options: none, width, height, fit, fill, distort |
| center | BOOLEAN | true | — |
| flip | BOOLEAN | false | — |
| flop | BOOLEAN | false | — |
| turn | BOOLEAN | false | — |
| filter | COMBO | cubic | 4 options: impulse, cubic, lanczos, area |
| black_outside | BOOLEAN | true | — |
| input_pixel_aspectopt | FLOAT | 1.000.1–10 | Pixel aspect ratio of the incoming image (1.0 = square pixels). ComfyUI images carry no format metadata, so declare it here when the source is anamorphic (e.g. PAL 1.09). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |