Nodes/Shima/Shima Multi Saver
ComfyUI Node

Shima Multi Saver

One node that saves your image and every utility map you'd make from it

By KDB-USJP·Created 6 months ago·Updated 6 months ago· 2
Shima Multi Saver
  • images
  • fx_in
  • shima.commonparams
  • saved_paths
  • count
  • preview_grid
  • image
save_modeSave to Disk
save_originaltrue
save_lineartfalse
lineart_resolution1024
line_art_invertfalse
lineart_intensity1.0
lineart_blur1
save_cannyfalse
canny_low0.40
canny_high0.80
save_depthfalse
depth_modeldepth_anything_v2_vitl_fp32.safetensors
save_normalfalse
normal_modeldsine
normal_strength1.0
save_palettefalse
palette_colors8
save_highlightfalse
highlight_threshold0.80
save_shadowfalse
shadow_threshold0.20
save_fxfalse
base_folderoutput
project_nameproject
base_name
collision_id_enabledtrue
collision_id_modenew_each_run
timestamp_enabledtrue
timestamp_format%Y%m%d_%H%M%S
prefix
suffix
filename_orderPRE,PRJ,BN,ET,SUF,TS,CID
separator_
export_with_metadatatrue
export_with_workflowtrue
user_notes
external_project
external_folder
external_collision_id
subfolder_path
use_commonparamstrue
allow_external_linkingfalse
show_used_valuesfalse

Shima Multi Saver is the all-in-one output node, and it's genuinely a lot of node. You feed it an image and it doesn't just save it - it can simultaneously extract lineart, run Canny edge detection, generate a depth map, produce a normal map, pull highlight/shadow masks, quantize a color palette, and save each one, all from a single pass, each output behind its own enable toggle. If you've ever rebuilt the same pipeline of "save PNG, extract edges for training data, generate depth map" by hand, this is the node that collapses it.

The realistic use cases: batch post-processing for dataset or ControlNet training prep, where you need the original plus its edge/depth/normal variants in one folder structure; or production saves where you want the rendered image plus its utility maps archived with consistent naming and embedded metadata. The naming system alone is worth a look - prefix/suffix, project name, collision ID, timestamp, and a filename-order template - which is the difference between "untitled_003.png" chaos and a clean, sortable archive.

A couple of honest notes before you dive in. This is the heaviest node in the pack. The lineart and depth processors auto-download models from HuggingFace on first use (the pack credits the comfyui-nikosis-preprocessors lineage for the lineart/depth logic), and the palette extraction uses scikit-learn's KMeans. If those aren't installed, the affected outputs degrade gracefully - the node checks for optional deps at import and falls back. So: expect a first-run download, and expect the whole feature set only if your Python env has the extras.

How it works

Each save_* toggle gates its own processing pipeline: lineart (sketch extraction with resolution, invert, intensity, and blur controls), canny (low/high threshold), depth (a DepthAnythingV2 model, or a greyscale fallback if the model can't load), normal (Sobel-gradient-based normal map), highlight and shadow (luminance thresholds), and palette (K-means color quantization with hex codes rendered into a grid). save_mode picks between writing to your ComfyUI output folder and a Preview Only mode that writes to the temp folder (cleaned on restart). Metadata goes into the PNG via user_notes, plus filename components like project_name, base_name, collision_id, and timestamp formatting. export_with_workflow embeds the workflow, so the saved files remain shareable/rebuildable the ComfyUI way.

The inputs that matter

  • images - the images to save (required).
  • save_original - almost always keep this on; it's your actual render.
  • The per-output toggles - save_lineart, save_canny, save_depth, save_normal, save_highlight, save_shadow, save_palette - each with its own parameter widgets (thresholds, model choice, resolution) appearing right below it.
  • save_mode - "Save to Disk" vs "Preview Only" for dry runs.
  • base_folder, project_name, base_name, prefix, suffix, filename_order, separator - the naming/archiving controls.
  • user_notes - metadata text embedded into the file.

Also in the main block: fx_in (an optional IMAGE for an externally-processed FX pass) and save_fx (whether to save it). Then the optional group: shima.commonparams (pulls project name, save path, collision ID, timestamp from Shima's Commons), external_project/external_folder/external_collision_id, subfolder_path, and the standard use_commonparams/allow_external_linking toggles.

Outputs

saved_paths (STRING - the paths it wrote), count (INT - how many files), preview_grid (IMAGE - a contact sheet of everything produced), and image (IMAGE - the original, passed through). The grid preview is the fastest way to sanity-check that your lineart came out right before you trust the folder.

How to install it

Part of the Shima pack - ComfyUI Manager, search "Shima", or:

cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf.git Shima

then restart. For the full feature set you may need to add scikit-learn (palette), opencv-python (edge/vision helpers), and huggingface_hub (model downloads) into ComfyUI's Python environment. The pack's own requirements.txt is minimal, so treat those as the real dependencies for this node.

Common issues & troubleshooting

Depth/lineart outputs are missing or blank. Either the model download failed or the optional dependency isn't installed - the node logs a fallback. pip install huggingface_hub into ComfyUI's Python and re-run; check the console for the download status.

Palette saves nothing. No scikit-learn → no KMeans → no palette. Install it and restart.

Files land somewhere unexpected. The save root is your ComfyUI output directory, but base_folder, subfolder_path, and commonparams-driven SAVE_PATH all move it. If files vanish into a subfolder you don't recognize, check external_folder and the commonparams save path first.

CategoryShima/Output

Inputs (46)

NameTypeDefaultDescription
imagesIMAGEImages to save.
fx_inIMAGEOptional input for FX pass (processed externally).
save_modeCOMBOSave to DiskSave Mode: 'Save to Disk' writes to your output folder. 'Preview Only' writes to ComfyUI temp folder (deleted on restart).
save_originalBOOLEANtrueSave the original unprocessed image.
save_lineartBOOLEANfalseSave sketch-style lineart (black lines on white). Uses Nikosis model.
lineart_resolutionINT10240–2048Processing resolution for lineart (0 = use input image size).
line_art_invertBOOLEANfalseInvert lineart. Default (False) is Black Lines on White. True is White Lines on Black.
lineart_intensityFLOAT1.00.1–10Intensity/Contrast of the lineart.
lineart_blurINT10–16Blur amount for lineart smoothing.
save_cannyBOOLEANfalseSave Canny edge detection (white edges on black).
canny_lowFLOAT0.400–1Canny low threshold (0-1).
canny_highFLOAT0.800–1Canny high threshold (0-1).
save_depthBOOLEANfalseSave depth map. Uses DepthAnythingV2 via Nikosis if installed.
depth_modelCOMBOdepth_anything_v2_vitl_fp32.safetensorsDepth model. Use 'greyscale' for simple luminance conversion.
save_normalBOOLEANfalseSave normal map using BAE, DSINE, or Sobel.
normal_modelCOMBOdsineNormal estimation: BAE (fast), DSINE (quality), or Sobel (no model).
normal_strengthFLOAT1.00.1–5Normal map intensity (for Sobel method).
save_paletteBOOLEANfalseSave color palette grid.
palette_colorsINT82–32Number of colors in palette.
save_highlightBOOLEANfalseSave highlight mask (bright areas).
highlight_thresholdFLOAT0.800–1Luminance threshold for highlights (0-1).
save_shadowBOOLEANfalseSave shadow mask (dark areas).
shadow_thresholdFLOAT0.200–1Luminance threshold for shadows (0-1).
save_fxBOOLEANfalseEnable FX pass (requires fx_in connection).
base_folderSTRINGoutputBase output folder (relative to ComfyUI root or absolute path).
project_nameSTRINGprojectProject name - used as subfolder and in filename.
base_nameSTRINGUser-supplied base filename. Leave blank to omit.
collision_id_enabledBOOLEANtrueAdd 6-char random ID to prevent overwrites.
collision_id_modeCOMBOnew_each_runnew_each_run = unique files; fixed = same ID across runs.
timestamp_enabledBOOLEANtrueAdd timestamp to filename.
timestamp_formatSTRING%Y%m%d_%H%M%SPython strftime format.
prefixSTRINGText to prepend to filename.
suffixSTRINGText to append before extension.
filename_orderCOMBOPRE,PRJ,BN,ET,SUF,TS,CIDOrder of filename components.
separatorCOMBO_Character between filename parts.
export_with_metadataBOOLEANtrueEmbed metadata in saved files.
export_with_workflowBOOLEANtrueEmbed workflow JSON in saved files.
user_notesSTRINGOptional notes stored in file metadata.
shima.commonparamsoptDICTConfiguration bundle from Shima.Commons (overrides settings).
external_projectoptSTRINGOverride project name from external source.
external_folderoptSTRINGOverride base folder from external source.
external_collision_idoptSTRINGUse specific collision ID (for matched outputs).
subfolder_pathoptSTRINGOptional subfolder path (useful for batch mirroring).
use_commonparamsoptBOOLEANtrueIf True, use settings from Shima.Commons bundle (Project, Folder, etc.)
allow_external_linkingoptBOOLEANfalseIf ON, this node broadcasts/receives OUTSIDE the Island (ignores group regex)
show_used_valuesoptBOOLEANfalseShow actual values being used (debug)

Outputs (4)

NameTypeDescription
saved_pathsSTRINGComma-separated list of saved file paths.
countINTNumber of files saved.
preview_gridIMAGEGrid preview of all saved images.
imageIMAGEOriginal image passthrough.