๐ฆ RS Save Image Pair
Before-and-after in one PNG, workflow included
- reference
- final
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, defaultThumbnailPair/img) - where inComfyUI/outputit lands.concat_type-horizontalorvertical.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
finaltoreference'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/text2only render when non-empty andfooter_heightis 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.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| reference | IMAGE | โ | |
| final | IMAGE | โ | |
| filename_prefix | STRING | ThumbnailPair/img | โ |
| concat_type | COMBO | horizontal | 2 options: horizontal, vertical |
| text1opt | STRING | โ | |
| text2opt | STRING | โ | |
| footer_heightopt | INT | 1000โ1024 | โ |
| font_nameopt | COMBO | Shadower.otf | 62 options: Shadower.otf, Caveat.ttf, Runic AltNo.ttf, Boorsok.otf, KJV 1611.otf, arial bold.ttf, +56 |
| font_sizeopt | INT | 501โ512 | โ |
| themeopt | COMBO | light | 2 options: dark, light |
| scale_factoropt | FLOAT | 1.000โ1 | โ |
Outputs (0)
No outputs