Nodes/WWAA-CustomNodes/🪠️ WWAA Before After Animator
ComfyUI Node

🪠️ WWAA Before After Animator

Animate a before/after comparison without touching a video editor

By hgabha·Created 2 years ago·Updated 6 months ago· 38
🪠️ WWAA Before After Animator
  • image1
  • image2
  • images
num_frames10
slider_directionleft_to_right
slider_width3
slider_color#FFFFFF
ease_functionlinear
loop_backfalse

The WWAA Before After Animator takes two images - a "before" and an "after," say an upscaled or restored version - and outputs a batch of frames that slide a reveal boundary across the pair, like one of those interactive before/after sliders, but as an animation you can turn into a video. If you compare results a lot (upscale demos, restoration comparisons, "which LoRA is better"), this is the fastest way to produce a shareable clip without opening a video editor.

It's part of WWAA-CustomNodes from WeirdWonderfulAI.Art. The output is an images batch, so you'd typically feed it into a video encoder (VHS-style save) or AnimateDiff-style sequence nodes to get an actual .mp4/.gif - the node itself just makes the frames.

How it works

The node takes image1 and image2, resizes both to the larger of the two dimensions (so mismatched sizes don't break the animation), and generates num_frames (2–100) frames. Each frame shows the reveal boundary at a different position - slider_direction chooses left-to-right, right-to-left, top-to-bottom, or bottom-to-top. slider_width (0–20) draws a divider line at the boundary (0 hides it), and slider_color sets its hex color (default white).

Two nice touches. ease_function - linear, ease_in, ease_out, or ease_in_out - changes the pacing so the reveal isn't a constant-speed wipe. And loop_back doubles the frame count so the slider travels to the "after" image and then returns to "before," making a seamless ping-pong loop that loops cleanly as a GIF. A "before → after → before" loop reads much better than a one-way wipe.

Inputs that matter

  • image1 / image2 - before and after.
  • num_frames - smoothness vs. file size; 10 is fine, 30 is smooth.
  • slider_direction - which way the reveal sweeps.
  • ease_function - set ease_in_out for a less mechanical feel.
  • loop_back - on, for a loopable animation.

Installing it

It's in the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/hgabha/WWAA-CustomNodes

Restart ComfyUI. Or ComfyUI Manager → search "WWAA Custom Nodes" → install → restart. It's under 🪠️ WWAA/image. No models, no declared dependencies beyond ComfyUI's bundled libs.

Gotchas

The resize-to-match behavior is worth knowing: mismatched image sizes get stretched to the larger dimensions, which can distort aspect ratio if your before and after differ in shape - feed it same-size images and this disappears. Also, the slider line is drawn as a rectangle of slider_width pixels centered on the boundary, so a width of 3 covers roughly 3 pixels; set it to 0 if you want a pure wipe. And the usual pack caveat: image nodes need OpenCV in ComfyUI's Python environment (install opencv-python if the whole 🪠️ WWAA/image menu is missing). Otherwise, this is a fun little node that produces surprisingly presentable comparison clips for almost no effort.

Category🪠️ WWAA/image

Inputs (8)

NameTypeDefaultDescription
image1IMAGE
image2IMAGE
num_framesINT102–100
slider_directionCOMBOleft_to_right4 options: left_to_right, right_to_left, top_to_bottom, bottom_to_top
slider_widthINT30–20Width of the slider line in pixels (0 for no line)
slider_colorSTRING#FFFFFFHex color for slider line (e.g., #FFFFFF for white)
ease_functionCOMBOlinear4 options: linear, ease_in, ease_out, ease_in_out
loop_backBOOLEANfalseIf True, creates a loop by sliding back to the before image using the same number of frames

Outputs (1)

NameTypeDescription
imagesIMAGE