Nodes/ComfyUI_RaykoStudio/๐ŸฆŠ RS Save Image Pair
ComfyUI Node

๐ŸฆŠ RS Save Image Pair

Before-and-after in one PNG, workflow included

By RaykosanยทCreated about a year agoยทUpdated 5 days agoยท 79
๐ŸฆŠ RS Save Image Pair
  • reference
  • final
    โ—„filename_prefixThumbnailPair/imgโ–บ
    โ—„concat_typehorizontalโ–บ
    โ—„text1โ–บ
    โ—„text2โ–บ
    โ—„footer_height100โ–บ
    โ—„font_nameShadower.otfโ–บ
    โ—„font_size50โ–บ
    โ—„themelightโ–บ
    โ—„scale_factor1.00โ–บ

    SaveImagePair takes your input image and your final render and saves them together as a single PNG - side by side or stacked - with the full workflow still embedded in the file's metadata. It exists for the most common social-post in this hobby: the before/after. Reference on one side, result on the other, one file to share, and anyone who drags it back into ComfyUI gets your entire pipeline.

    The "pair" framing matters for more than posting, though. If you're iterating on img2img, inpainting, or an upscale chain, an input-vs-output archive lets you flip through a folder and instantly see what each run actually changed. That's the workflow-sharing culture ComfyUI runs on, made legible.

    How it works

    The node takes your reference and final images, resizes final to match reference's dimensions (Lanczos - so feed it matching aspect ratios, see below), optionally appends a caption footer under each, concatenates the two blocks horizontally or vertically, and saves with the prompt and workflow written into the PNG metadata. It's batch-aware: if the two inputs have different batch sizes it truncates to the smaller and logs a warning, which is a polite touch in a node that will one day be fed a 64-frame batch by accident.

    The scale_factor slider (0.0โ€“1.0) is the sleeper feature - the author calls it a "reverse upscale." It shrinks the whole combined image after assembly, which is how you make a small shareable thumbnail while the embedded workflow stays full-size in the metadata. Keep the workflow, lose the pixels.

    Inputs and outputs

    • reference (IMAGE) - the original/input image.
    • final (IMAGE) - the finished result.
    • filename_prefix (STRING, default ThumbnailPair/img) - where in ComfyUI/output it lands.
    • concat_type - horizontal or vertical.
    • text1 / text2 (multiline STRING) - captions under the reference and final blocks; empty = no footer.
    • footer_height (INT, 0โ€“1024, default 100), font_name (pick from the pack's bundled fonts), font_size (1โ€“512, default 50), theme (dark/light), scale_factor (FLOAT, 0โ€“1, default 1).

    No outputs - it's an output node.

    The author's own tip is worth passing along: horizontal layout suits portraits, vertical suits landscapes. It's a sizing-honesty rule, not a superstition.

    Install

    Same pack as every RS node. ComfyUI Manager โ†’ search ComfyUI_RaykoStudio, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Raykosan/ComfyUI_RaykoStudio.git
    

    Restart after. No extra models or downloads. Fonts work like the rest of the pack: .ttf/.otf into ComfyUI/custom_nodes/ComfyUI_RaykoStudio/fonts, then restart.

    Common issues

    • Final image looks squished - the node resizes final to reference's dimensions rather than letterboxing, so mismatched aspect ratios get stretched. Crop/scale your inputs to match before this node, or the "before" and "after" won't line up.
    • Captions missing - text1/text2 only render when non-empty and footer_height is above 0.
    • Only the first few images saved - batch sizes differed and it truncated to the smaller one. Check the console; it prints a warning when that happens.
    Category๐ŸฆŠ RaykoStudio

    Inputs (11)

    NameTypeDefaultDescription
    referenceIMAGEโ€”
    finalIMAGEโ€”
    filename_prefixSTRINGThumbnailPair/imgโ€”
    concat_typeCOMBOhorizontal2 options: horizontal, vertical
    text1optSTRINGโ€”
    text2optSTRINGโ€”
    footer_heightoptINT1000โ€“1024โ€”
    font_nameoptCOMBOShadower.otf62 options: Shadower.otf, Caveat.ttf, Runic AltNo.ttf, Boorsok.otf, KJV 1611.otf, arial bold.ttf, +56
    font_sizeoptINT501โ€“512โ€”
    themeoptCOMBOlight2 options: dark, light
    scale_factoroptFLOAT1.000โ€“1โ€”

    Outputs (0)

    No outputs