Non-Square Pixels V1
The PAL/NTSC pixel-stretch trick, one node
- images
- IMAGE
NonSquarePixelsV1 is a small, weird, genuinely useful node: it applies a pixel aspect ratio to your images. You know how old broadcast video looks slightly horizontally stretched or squashed - faces a touch too wide, everything a bit off? That's not a rendering bug, that's non-square pixels. Broadcast formats ran on rectangular pixels, and this node lets you fake that look on any image with a couple of presets.
It's from the cinematic-effects corner of DJZ-Nodes, and it's the quiet step that sells a vintage look. Pair it with the pack's VHS or interlaced nodes and the "this was shot on tape" illusion gets a lot more convincing, because the aspect-ratio weirdness is exactly the thing people can't name but can feel.
How it works
The mechanism is trivial and honest: it resizes the image's width by the pixel aspect ratio, then - by default - resizes back to the original dimensions so the file size doesn't change but the content has been stretched and squashed in the process. That double-resize is what produces the subtle "rectangular pixels" distortion instead of just a wider image.
The preset menu gives you the real broadcast ratios:
- PAL (4:3) - 1.0667
- PAL Widescreen (16:9) - ≈1.4223
- NTSC (4:3) - 0.9091 (this one squashes horizontally, the classic NTSC squeeze)
- NTSC Widescreen (16:9) - ≈1.2121
- CUSTOM - your own ratio via
custom_pixel_aspect_ratio(0.5–2, default 1.0667)
The inputs that matter
- preset - the format you're emulating. NTSC presets squash, PAL presets stretch, so the direction of the distortion is the first thing to check.
- custom_pixel_aspect_ratio - only used when preset is CUSTOM. 1.0 = square pixels, above 1 = stretch wider, below 1 = squash narrower.
- preserve_original_size -
enable(default) keeps the output at the input's dimensions via the second resize;disableoutputs at the true stretched size. Keep it enabled unless you specifically want a non-square-dimension image.
Output: one IMAGE at the same batch size. Same wiring as any effect node - straight to a Save, or into the VHS/interlaced chain.
Installing it
It's a DJZ-Nodes pack node. ComfyUI Manager → Install Custom Nodes → search DJZ-Nodes → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Needs OpenCV (opencv-python) for the resizes, which the pack's requirements cover. If cv2 is missing you'll see an import error at startup, and that's the dependency to check.
Common issues
The honest gotcha is subtlety: the effect is supposed to be slight. If you set a custom ratio like 1.5 or 0.7 expecting drama, you get obvious warping instead of a broadcast look - the authentic presets are all within a few percent of 1.0 for a reason. Also, preserve_original_size being on by default means text and fine detail take a softness hit from the double resize; if you're compositing this over sharp content, check it at 100% before committing. And there's no per-frame animation here - it's a static per-image transform, so for a "format wobble" across a video you'd pair it with something that animates, not expect it to animate itself.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| preset | COMBO | CUSTOM | 5 options: CUSTOM, PAL (4:3), PAL WIDESCREEN (16:9), NTSC (4:3), NTSC WIDESCREEN (16:9) |
| custom_pixel_aspect_ratio | FLOAT | 1.06670.5–2 | — |
| preserve_original_size | COMBO | enable | 2 options: enable, disable |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |