Shima Preview Compare
The draggable-slider preview
- left
- right
- shima.commonparams
- left
- right
If you A/B test prompts, compare denoise levels, or flip between a base render and an upscaled version, you know the routine: generate two images, side by side, squint at both, go cross-eyed. The Shima Preview Compare puts a draggable divider between them so you can slide back and forth and actually see the difference at full resolution instead of two shrunken thumbnails.
It's the compare node of the Shima (島, island) pack, and like its sibling Shima Preview it carries the pack's Copy/Edit/Save toolbar - with a twist: click left or right of the divider to select which side the buttons act on. So you can look at the "after" and hit Save without first swapping images around.
How it works
Two required IMAGE inputs, left (Before) and right (After). The frontend renders them stacked with a vertical divider you can drag; click either half to focus that side for the toolbar. The fit_mode widget handles mismatched sizes:
- Squeeze (default) - stretches both to a common box.
- Crop to Left / Crop to Right - fits the canvas to one side's aspect and crops the other, which keeps dimensions honest when comparing a 512 render to a 1024 upscale.
Internally it's the same machinery as Shima Preview: temp PNGs, a stored last-batch reference, and FileNamer/Commons integration so the Save button writes with proper names and embedded workflow metadata.
The inputs that matter
left/right- the two images (both required).fit_mode- how mismatched aspects are handled.filename/folder_path- from FileNamer, control Save destination.shima.commonparams+use_commonparams- save defaults from Shima.Commons.
The outputs
Both left and right pass through unchanged, so you can fork the compared images to a save node or another comparison downstream. It's an output node - it always runs - which is what you want from a viewer in a big workflow.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf.git Shima
pip install -r requirements.txt
Restart, then Shima/Image → Shima Preview Compare. ComfyUI Manager: search "Shima". First boot auto-clones ComfyUI-Impact-Pack and cg-use-everywhere if missing (Use Everywhere is the island auto-linking backbone) - normal.
Common issues
The main trap is a mismatch between what you compare and what you save: with the divider, "which image am I looking at" is obvious, but the Save button acts on whichever side is selected, and it's easy to forget you clicked the left half. If your "after" file turns out to be the "before" image, that's what happened. Also, Squeeze can lie to you - a heavily distorted thumbnail makes differences look bigger or smaller than they are; switch to a crop mode when the aspects differ a lot. Like the rest of this pack it's new and lightly discussed in the community, so when something odd happens, the save/compare logic in nodes/preview_compare.py is short enough to read straight through.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| left | IMAGE | Left-side image (Before). | |
| right | IMAGE | Right-side image (After). | |
| shima.commonparamsopt | DICT | Configuration bundle from Shima.Commons (for Save defaults). | |
| filenameopt | STRING | Filename from FileNamer (for Save button). | |
| folder_pathopt | STRING | Folder path from FileNamer (for Save button). | |
| save_with_workflowopt | BOOLEAN | true | Embed workflow in saved image. |
| save_with_metadataopt | BOOLEAN | true | Embed generation metadata in saved image. |
| fit_modeopt | COMBO | Squeeze | 3 options: Squeeze, Crop to Left, Crop to Right |
| use_commonparamsopt | BOOLEAN | true | Use Shima.Commons settings if connected |
| allow_external_linkingopt | BOOLEAN | false | If ON, this node broadcasts/receives OUTSIDE the Island (ignores group regex) |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| left | IMAGE | Passthrough of left input. |
| right | IMAGE | Passthrough of right input. |