Nodes/SDVN_Comfy_node/💾 Save Image + Compare
ComfyUI Node

💾 Save Image + Compare

Save an image, or a before/after pair

By StableDiffusionVN·Created 2 years ago·Updated about a month ago· 118
💾 Save Image + Compare
  • image
  • compare_image
    filename_prefixSDVN

    The pack's own save node, and it does one thing the stock ComfyUI Save Image doesn't: hand it a second image alongside the first, and it builds a side-by-side comparison frame automatically. Great for anything where "before and after" is the actual point - an upscale, a color-grade pass, a LoRA A/B test, an inpaint result against the original.

    What it does

    Wire in your main image and this saves it - same core job as the stock Save Image node. But if you also plug something into compare_image, it doesn't just save two separate files: it lays them out into one comparison frame, so you get a single image you can scroll past or drop into a gallery that already tells the before/after story without you manually stitching anything together afterward. That's the "+ Compare" in the display name, and it's the whole reason to reach for this over the built-in save node when you're doing iterative work you want to visually track.

    The inputs and outputs that matter

    • image - the primary image to save (and, with a compare image present, the first half of the comparison frame).
    • filename_prefix - default SDVN, the usual filename-prefix convention every save node in ComfyUI uses.
    • compare_image (optional) - a second image. Leave it unwired for a plain save; connect it and you get the side-by-side comparison output instead.

    No outputs - it's a terminal node, same as the stock Save Image. The result lands in your ComfyUI output folder.

    Installing it

    ComfyUI Manager: search SDVN_Comfy_node, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StableDiffusionVN/SDVN_Comfy_node
    

    Then pip install -r custom_nodes/SDVN_Comfy_node/requirements.txt from your ComfyUI root, and restart. Nothing to download.

    Where people get burned

    Forgetting compare_image means you just get a plain save. There's no separate toggle - the comparison behavior is purely driven by whether that optional input is wired. If you expected a before/after frame and only got a single saved image, check that the second image is actually connected.

    Mismatched sizes between image and compare_image. A comparison layout generally reads best when both images share the same dimensions - feed it a portrait and a landscape crop side by side and the result can look lopsided or oddly cropped. Match your sizes upstream (an Upscale Image or Crop By Ratio node) before comparing.

    This is one node's output, not a gallery. Each run of this node produces one file. If you're doing a longer A/B sweep across many variants, you'll still want to run it once per pair rather than expecting it to batch multiple comparisons into one output automatically.

    Category📂 SDVN/🏞️ Image

    Inputs (3)

    NameTypeDefaultDescription
    imageIMAGEẢnh đầu tiên sẽ được lưu ra thư mục output.
    filename_prefixSTRINGSDVNTiền tố tên file, hỗ trợ cú pháp %dd (ngày), %mm (tháng), %yy (năm), %w (chiều rộng), %h (chiều cao), %maxsize (kích thước lớn nhất).
    compare_imageoptIMAGEẢnh thứ hai (không lưu) để tạo khung so sánh.

    Outputs (0)

    No outputs