Flip/Mirror Image (Purz)
The two-second fix that saves a rerun
- image
- image
Flip is the kind of node you don't install on purpose - and then a workflow hands you a reference image that's mirrored the wrong way and you go looking for it. PurzImageFlip is ComfyUI-Purz's answer: one IMAGE in, one IMAGE out, a dropdown for horizontal, vertical, or both. No frills, no settings to misread, done.
Why you'll actually reach for it
The classic case is handedness. You generate a character or a product shot and realize the logo is backwards, or you load a reference where the lighting direction doesn't match your scene. Flipping is also a standard trick for data-augmenting a batch before training or img2img - mirror an image, run it, get a different composition for free. And in tiling or pattern work, flipping a texture horizontally or vertically is how you build seamless variations. It's a dumb utility that quietly saves you from regenerating.
How it works
It's a straight tensor flip, no resampling involved, so it's instant and lossless - nothing to tune. The node loops over the batch, so flipping a whole sequence of frames costs about the same as flipping one. Mirroring is one of the few image transforms that doesn't degrade quality at all, because you're not interpolating a single pixel.
The inputs and outputs
- image - the
IMAGEtensor to mirror. Works on any batch size. - flip_mode -
horizontal,vertical, orboth. Horizontal is the default and the one you'll use 95% of the time;bothrotates the image 180° and is handy when you need a quick upside-down variant.
Output is image, same IMAGE type and dimensions, so it drops anywhere in the graph - into a sampler's reference input, a batch combine, or straight to a save node.
That's the entire schema. If you need to rotate by an arbitrary angle with a background fill instead, the same pack ships PurzImageRotate; flip is specifically the no-interpolation, no-fill version.
Installing it
ComfyUI Manager - search ComfyUI-Purz - or:
cd ComfyUI/custom_nodes/
git clone https://github.com/purzbeats/ComfyUI-Purz.git
cd ComfyUI-Purz
pip install -r requirements.txt
Restart ComfyUI and you're done. The requirements are OpenCV, Pillow, torch, and numpy, all of which you already have; there are no models to download. The pack is by PurzBeats, a Comfy Org staffer, and it shows the kind of polish you expect: modern ComfyUI builds get a clean V3 slider UI, older ones fall back to classic widgets.
The only thing to watch
Flipping is non-destructive and cheap, so there's no real failure mode - the only mistake people make is flipping after they've already baked text into the image, so the text comes out mirrored. If legible text matters, flip before any text overlay or before the VAE decode, not after. Other than that, it's about as foolproof as a node gets.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| flip_mode | COMBO | horizontal | 3 options: horizontal, vertical, both |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |