Nodes/ComfyUI_Nimbus-Pack/Slider Comparison (Video)
ComfyUI Node

Slider Comparison (Video)

Render a before/after slider-wipe video from two images

By sergekatzmann·Created 3 years ago·Updated 8 months ago· 7
Slider Comparison (Video)
  • image_before
  • image_after
  • video_path
video_duration10.0
frame_rate30
slider_color255,0,0
slider_thickness5
target_height1080
filename_prefixslider_comparison

You know the before/after reveal videos people post to show off an upscale or a restoration - a vertical divider that wipes across, old image on one side, new image on the other? This node bakes exactly that into an MP4 file. Feed it two images, a "before" and an "after," and it renders a video with a moving slider sweeping between them. In the menu it's Slider Comparison (Video).

It's the one node in the Nimbus pack that produces a shareable video artifact rather than an image, and it's the whole reason the pack ships a requirements.txt at all.

How it works

The node takes your two images, scales them to a common height, and animates a slider bar moving across the frame - revealing more of the "after" as it goes - then encodes the result to an MP4 using moviepy. You control the timing (video_duration, frame_rate), the divider's look (slider_color, slider_thickness), and the output resolution (target_height). It's a genuine output node: it writes the file itself and hands you back the path.

Worth knowing how this differs from the interactive comparers people use inside ComfyUI (rgthree's Image Comparer, for example, gives you a slide-to-compare widget in the graph). Those are for looking at a result live in the editor. This one renders a standalone video you can drop into a post - different job, and the reason you'd pick this specifically.

The inputs and outputs that matter

  • image_before / image_after - the two images to compare.
  • video_duration (seconds) and frame_rate - how long the wipe takes and how smooth it is.
  • target_height - the output video's height in pixels; both images are scaled to it.

The rest are cosmetic: slider_color (a comma-separated RGB string like "255,0,0" for red), slider_thickness, and filename_prefix for the saved file's name.

Output: video_path, a string pointing at the rendered MP4 (which lands in your ComfyUI output folder).

Installing it

ComfyUI Manager: search ComfyUI_Nimbus-Pack, install, restart. It's a small, low-profile pack, so if the registry doesn't turn it up, clone it manually - and for this node, don't skip the pip step:

cd ComfyUI/custom_nodes
git clone https://github.com/sergekatzmann/ComfyUI_Nimbus-Pack.git
pip install -r ComfyUI_Nimbus-Pack/requirements.txt

Restart. Unlike the rest of the pack, this node has a real dependency: moviepy (which in turn needs ffmpeg available). That's what the requirements.txt installs.

Common issues & troubleshooting

"No module named moviepy" or an ffmpeg error. This is the common one, and it's why the install step above matters. The image and math nodes in this pack work without any dependencies, but the video node doesn't - if you cloned the repo and skipped pip install -r requirements.txt, this node will fail. Run the install, and make sure ffmpeg is present on the system (moviepy shells out to it); on a managed cloud runner it usually already is.

The output is a file path, not a preview. video_path is a string, not an image or video tensor - you can't wire it into a preview node expecting pixels. The video is written to disk; go find the MP4 in your output folder.

Before and after look misaligned. Both images are scaled to target_height, but if they started at different aspect ratios the widths won't match and the wipe will look off. Pre-match them first - the pack's Image Resize And Crop or Image Square Adapter nodes are right there for exactly this.

The wipe is choppy. Raise frame_rate (30 is smooth) and check video_duration isn't so short that only a few frames get rendered.

CategoryNimbus-Pack/Video

Inputs (8)

NameTypeDefaultDescription
image_beforeIMAGE
image_afterIMAGE
video_durationFLOAT10.01–60
frame_rateINT301–60
slider_colorSTRING255,0,0
slider_thicknessINT51–20
target_heightINT1080100–4096
filename_prefixSTRINGslider_comparison

Outputs (1)

NameTypeDescription
video_pathSTRING