ComfyUI Node

Nuke Reformat

Put any generation on a standard canvas with Nuke Reformat

By sumitchatterjee13·Created about a year ago·Updated 22 days ago· 60
Nuke Reformat
  • image
  • IMAGE
typeto format
formatHD_1080
custom_width1920
custom_height1080
custom_pixel_aspect1.00
save_format_as
box_width1920
box_height1080
box_pixel_aspect1.00
scale1.00
resize_typewidth
centertrue
flipfalse
flopfalse
turnfalse
filtercubic
black_outsidetrue
input_pixel_aspect1.00

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 with box_width, box_height, box_pixel_aspect.
  • scale - just multiply the input size by scale (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

  • type and format are the big two - for 90% of use, set type to "to format", pick HD_1080, and pick your resize_type.
  • save_format_as - the hidden gem. Set format to "custom", dial in custom_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.

CategoryNuke/Transform

Inputs (19)

NameTypeDefaultDescription
imageIMAGE
typeCOMBOto format3 options: to format, to box, scale
formatCOMBOHD_108017 options: PAL, NTSC, PAL_16:9, NTSC_16:9, HD_720, HD_1080, +11
custom_widthINT19201–16384
custom_heightINT10801–16384
custom_pixel_aspectFLOAT1.000.1–10
save_format_asSTRINGWhen 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_widthINT19201–16384
box_heightINT10801–16384
box_pixel_aspectFLOAT1.000.1–10
scaleFLOAT1.000.01–100
resize_typeCOMBOwidth6 options: none, width, height, fit, fill, distort
centerBOOLEANtrue
flipBOOLEANfalse
flopBOOLEANfalse
turnBOOLEANfalse
filterCOMBOcubic4 options: impulse, cubic, lanczos, area
black_outsideBOOLEANtrue
input_pixel_aspectoptFLOAT1.000.1–10Pixel 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)

NameTypeDescription
IMAGEIMAGE