ComfyUI Node

Save to ZIP

Archive multiple frame/mask streams straight from your graph

By Mister-Link·Created 9 months ago·Updated 24 days ago· 0
Save to ZIP
      zip_pathoutput/archive
      input1_prefix
      input2_prefix
      input3_prefix
      input4_prefix
      input5_prefix
      input6_prefix
      input7_prefix
      input8_prefix

      Some workflows produce more than one sequence you care about at once - RGB frames, an alpha mask sequence, a pose reference video, maybe a second output variant - and dumping each into its own separate folder before you can download anything is annoying overhead. Save to ZIP skips the intermediate step entirely: wire your image and mask streams straight into it and it writes them directly into one archive as it runs, no separate save-to-disk pass first.

      How it works

      That's the real difference from its sibling Save Folder as ZIP in this same pack: that node archives a folder that already exists on disk, while this one builds the archive directly from tensors connected in your graph. It exposes up to eight numbered input slots, each paired with its own prefix field, so files from different streams land in the archive distinguishably instead of all colliding under the same generic filenames - connect your RGB frames to one slot with a frames_ prefix, your mask sequence to another with a mask_ prefix, and you get one clean archive with everything sorted by name.

      The inputs and outputs that matter

      • zip_path (STRING, default output/archive) - the base path/name for the archive.
      • input1_prefix through input8_prefix (STRING, all optional, default empty) - up to eight slots. Each corresponds to an image or mask stream you connect into that numbered input socket in the graph; the prefix field is the naming knob for whatever's plugged into that slot. You only need to fill in a prefix for the slots you're actually using - leave the rest disconnected.

      There are no outputs. is_output_node is true - like Save Folder as ZIP, this is a terminal write-to-disk step.

      How to install it

      Search "Link Comfy Nodes" in ComfyUI Manager and install from there. Or by hand:

      cd ComfyUI/custom_nodes
      git clone https://github.com/Mister-Link/link-comfy-nodes
      pip install -r link-comfy-nodes/requirements.txt
      

      Restart ComfyUI. No extra models or heavy dependencies for this node specifically.

      Common issues & troubleshooting

      Connected a slot but left its prefix blank. Files from that stream will still get written, just without anything to distinguish them by name - if two connected slots both start numbering their files from frame 0 with no prefix, you risk one silently overwriting the other inside the archive. Give every slot you actually use its own prefix as a habit, not an afterthought.

      Reusing the same zip_path across runs. If you don't vary the path between runs (a batch index, a timestamp, a run ID), a second run targeting the same name risks colliding with the first - check whether your setup overwrites or errors on an existing path, and build variation into the path if you're iterating.

      Mismatched batch sizes between connected streams. Each slot is its own independent stream, so there's no requirement that they all share the same frame count - but if you're expecting them to line up frame-for-frame (RGB and its matching alpha mask, for instance) and they don't, that mismatch happens silently at the archive level rather than erroring, so double-check batch counts upstream before relying on the files lining up by index once unzipped.

      CategoryVideo/Masking

      Inputs (9)

      NameTypeDefaultDescription
      zip_pathSTRINGoutput/archive
      input1_prefixoptSTRING
      input2_prefixoptSTRING
      input3_prefixoptSTRING
      input4_prefixoptSTRING
      input5_prefixoptSTRING
      input6_prefixoptSTRING
      input7_prefixoptSTRING
      input8_prefixoptSTRING

      Outputs (0)

      No outputs