Nodes/comfyui-fvmtools/Batch Save Multi
ComfyUI Node

Batch Save Multi

Saves up to 8 variants of one picture into their own folders, optionally gated by detections, then keeps, moves or deletes the original.

By ping1979ping·Created 6 months ago·Updated 2 days ago· 1
Batch Save Multi
  • image_1
  • gate_1
  • image_2
  • gate_2
  • image_3
  • gate_3
  • image_4
  • gate_4
  • image_5
  • gate_5
  • image_6
  • gate_6
  • image_7
  • gate_7
  • image_8
  • gate_8
  • saved_paths
  • matched
  • matched_count
  • report
◄slots2►
◄routeall_matches►
◄base_dir►
◄fallback_dirunsorted►
◄originalkeep►
◄original_whenalways►
◄original_dirdone►
◄formatkeep►
◄quality95►
◄mask_min_area0.001►
◄overwritefalse►
◄source_path►
◄subdir_1refined►
◄subdir_2slot_2►
◄subdir_3slot_3►
◄subdir_4slot_4►
◄subdir_5slot_5►
◄subdir_6slot_6►
◄subdir_7slot_7►
◄subdir_8slot_8►
CategoryFVM Tools/Batch

Inputs (36)

NameTypeDefaultDescription
slotsINT21–8How many slots are in use.
routeCOMBOall_matchesall_matches: every slot whose gate fires gets the picture. first_match: only the first gated slot that fires. Slots without a gate always write.
base_dirSTRINGWhere relative folders live. Empty = the folder the source picture came from.
fallback_dirSTRINGunsortedGets a copy of the original when gates are wired but none fired. Empty = do nothing.
originalCOMBOkeepWhat happens to the source file once every slot is written. keep: stays. move/copy: into original_dir. delete: removed for good (no recycle bin).
original_whenCOMBOalwaysalways: handle the original on every run. on_match: only when at least one gate fired — pictures without a hit stay where they are.
original_dirSTRINGdoneTarget for original = move/copy.
formatCOMBOkeepEncoding for slots with an image input. keep: the source file's extension, PNG if unknown.
qualityINT951–100JPEG/WebP quality.
mask_min_areaFLOAT0.0010–1Share of set pixels a MASK gate needs to fire. 0.001 = 0.1 % of the picture.
overwriteBOOLEANfalseOff: a colliding name gets _001, _002, …
source_pathoptSTRINGThe loader's source_path. Needed for slots without an image, for the original handling and as the base of relative folders.
image_1optIMAGESlot 1: picture to save. Unconnected = copy the original file untouched.
gate_1opt*Slot 1: condition. BOOLEAN, a count (> 0), or a MASK (fires above mask_min_area). Unconnected = always write.
subdir_1optSTRINGrefinedSlot 1: target folder. Relative to base_dir (or the source folder), or an absolute path.
image_2optIMAGESlot 2: picture to save. Unconnected = copy the original file untouched.
gate_2opt*Slot 2: condition. BOOLEAN, a count (> 0), or a MASK (fires above mask_min_area). Unconnected = always write.
subdir_2optSTRINGslot_2Slot 2: target folder. Relative to base_dir (or the source folder), or an absolute path.
image_3optIMAGESlot 3: picture to save. Unconnected = copy the original file untouched.
gate_3opt*Slot 3: condition. BOOLEAN, a count (> 0), or a MASK (fires above mask_min_area). Unconnected = always write.
subdir_3optSTRINGslot_3Slot 3: target folder. Relative to base_dir (or the source folder), or an absolute path.
image_4optIMAGESlot 4: picture to save. Unconnected = copy the original file untouched.
gate_4opt*Slot 4: condition. BOOLEAN, a count (> 0), or a MASK (fires above mask_min_area). Unconnected = always write.
subdir_4optSTRINGslot_4Slot 4: target folder. Relative to base_dir (or the source folder), or an absolute path.
image_5optIMAGESlot 5: picture to save. Unconnected = copy the original file untouched.
gate_5opt*Slot 5: condition. BOOLEAN, a count (> 0), or a MASK (fires above mask_min_area). Unconnected = always write.
subdir_5optSTRINGslot_5Slot 5: target folder. Relative to base_dir (or the source folder), or an absolute path.
image_6optIMAGESlot 6: picture to save. Unconnected = copy the original file untouched.
gate_6opt*Slot 6: condition. BOOLEAN, a count (> 0), or a MASK (fires above mask_min_area). Unconnected = always write.
subdir_6optSTRINGslot_6Slot 6: target folder. Relative to base_dir (or the source folder), or an absolute path.
image_7optIMAGESlot 7: picture to save. Unconnected = copy the original file untouched.
gate_7opt*Slot 7: condition. BOOLEAN, a count (> 0), or a MASK (fires above mask_min_area). Unconnected = always write.
subdir_7optSTRINGslot_7Slot 7: target folder. Relative to base_dir (or the source folder), or an absolute path.
image_8optIMAGESlot 8: picture to save. Unconnected = copy the original file untouched.
gate_8opt*Slot 8: condition. BOOLEAN, a count (> 0), or a MASK (fires above mask_min_area). Unconnected = always write.
subdir_8optSTRINGslot_8Slot 8: target folder. Relative to base_dir (or the source folder), or an absolute path.

Outputs (4)

NameTypeDescription
saved_pathsSTRING—
matchedSTRING—
matched_countINT—
reportSTRING—