Nodes//Nougan Before / After πŸ”€
ComfyUI Node

Nougan Before / After πŸ”€

A before/after comparison grid that lives inside your graph

By WinnouganΒ·Created 2 months agoΒ·Updated about a month agoΒ· 4
Nougan Before / After πŸ”€
  • image1
  • image2
  • image3
  • image
β—„text1Beforeβ–Ί
β—„text2Afterβ–Ί
β—„text3Image 3β–Ί
β—„gap8β–Ί
β—„label_height48β–Ί
β—„bg_color#000000β–Ί
β—„text_color#FFFFFFβ–Ί

Every workflow eventually hits the same wall: you're iterating on an edit, you want to see the before next to the after, and you're either eyeballing two separate preview windows or cobbling together a composite manually. NouganBeforeAfterCompare is the version of that problem that takes 30 seconds and zero fuss - two images in, one labeled side-by-side image out, rendered right in the graph.

It's a straightforward image utility from Winnougan's Nougan_Nodes suite. Nothing clever, and that's the compliment: it does one comparison job and gets out of the way.

How it works

The node takes your images, resizes each panel to match the first image's height (so a 512px-wide and a 1024px-wide before/after line up cleanly), stacks them horizontally with a configurable gap, and lays a label strip across the top. Labels are drawn with PIL - it tries arial.ttf first and falls back to a default bitmap font if the system font isn't there, so it works on a bare Linux box even if the text looks more utilitarian.

It takes the first frame of each image batch. If you're feeding it a multi-frame batch from a video or a batch sampler, remember you're comparing frame 0 of each, not the whole batch.

The inputs that matter

  • image1, image2 - required. image1 is "Before", image2 is "After".
  • image3 - optional third panel, default label "Image 3". Handy for A/B/C sampler comparisons.
  • text1, text2, text3 - the labels above each panel.
  • gap - pixels between panels (0–64, default 8).
  • label_height - height of the label strip (0–256, default 48). Set to 0 for no labels at all.
  • bg_color, text_color - hex colors, default black background / white text.

Single output: image, ready to preview or save. It's not an output-only node, so you can chain it into a saver or a grid if you want.

Installing

Search Nougan in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Winnougan/Nougan_Nodes
# restart ComfyUI

No pip dependencies - Pillow ships with ComfyUI, and the node handles a missing font gracefully. The pack loads each family in its own try/except, so this living in the Nougan/image family can't take anything else down if it fails.

Where it bites

Nothing deep here, just two practical notes. First, every image gets resized to image1's height, so if your "after" is a wildly different aspect ratio it'll be squashed rather than letterboxed - for upscales you'll usually want to feed a matched pair. Second, hex colors are parsed with a permissive fallback, so a malformed color silently becomes black or white instead of erroring, which can make a labeled comparison look mysteriously empty until you notice. Label the panels, wire the images, queue, done - that's the whole workflow.

CategoryNougan/image

Inputs (10)

NameTypeDefaultDescription
image1IMAGEβ€”
image2IMAGEβ€”
image3optIMAGEβ€”
text1optSTRINGBeforeβ€”
text2optSTRINGAfterβ€”
text3optSTRINGImage 3β€”
gapoptINT80–64β€”
label_heightoptINT480–256β€”
bg_coloroptSTRING#000000β€”
text_coloroptSTRING#FFFFFFβ€”

Outputs (1)

NameTypeDescription
imageIMAGEβ€”