ComfyUI Node Runs on cloud

ZIP Manage

Trim a zip to just the entries you want

By WASasquatch·Created 3 years ago·Updated 4 days ago· 1,844
ZIP Manage
  • zip
  • zip
  • names
  • entry_count
entries
selectionpick on the node
action
hold_timeout600
compression

ZIP Manage is the filter node of the WAS archive family. Feed it an archive and it answers a new archive holding only the entries you chose to keep - or everything except the ones you told it to drop. Same as the rest of the family, the zip stays on the wire as a ZIP value until you decide to write it, so you can filter, then keep filtering or adding, then Save ZIP at the end.

It earns its keep in the awkward middle of dataset work. You've got one zip with 500 training images plus a junk folder of READMEs and stale crops; you want the good 480, re-zipped, without unzipping to disk and re-zipping by hand. Or you want to strip a captions folder out of a bundle before handing it to a loader. That's this node.

Choosing what survives

selection decides where the entry list comes from, and it's the only input that will ever make you wait:

  • "pick on the node" - the run holds while the node lists what the archive holds so you can tick the entries you want, on the node. This is the nice interactive mode… but note the escape hatch: with no browser connected it falls back to reading the entries box below instead, so a headless run never deadlocks waiting for clicks.
  • "the entries box" - always reads the names you type in entries, never holds the run. One name per line, folders included, spelled as the archive carries them; a # line is a comment.

action then decides whether the chosen names are the ones kept (keep the chosen) or the ones removed (remove the chosen) - which is your quick way to say "everything except this junk folder."

If you do use the hold-and-tick mode, hold_timeout is your leash. It defaults to 600 seconds (ten minutes, generous); set 0 and it waits forever. A hold that times out keeps every entry and says so - the safe failure, since dropping everything you didn't tick would be the destructive one.

compression is the same deflate-vs-store choice as the rest of the family: deflate shrinks text and JSON, store suits already-compressed pictures.

Outputs

zip is the filtered archive - send it to Save ZIP, a loader, or another ZIP Manage. names gives you the entry names it now holds on one ARRAY wire, and entry_count is an INT so you can sanity-check that you kept the 480 you meant to and not 47. That count is the cheap verification; the names list is the thorough one.

Install

WAS Node Suite v3 - ComfyUI Manager → search "WAS Node Suite v3", or cd ComfyUI/custom_nodes && git clone https://github.com/WASasquatch/was-node-suite-comfyui, then restart. Needs ComfyUI 0.14.0+ / Python 3.10+, no feature flag, no extra packages.

The trap to remember is the timeout defaulting to keep everything. If you build a workflow that holds for ticks and walk away, ten minutes later you get an archive with every entry - which is not what you'd have picked, but it's also not a data-loss incident. For anything unattended, type the names into the entries box and set selection to read them; the interactive ticking is for when you're sitting at the canvas.

CategoryWAS Suite/Archive

Inputs (6)

NameTypeDefaultDescription
zipZIPThe archive to filter, from Open ZIP, ZIP Add or another ZIP Manage.
entriesSTRINGEntry names, one per line, spelled as the archive carries them, folders included. Read only when selection is 'the entries box'. With action 'keep the chosen' these are the entries kept; with 'remove the chosen' they are the ones dropped. A '#' line is a comment. Eg: chapters/one.html
selectionCOMBOpick on the node'pick on the node' holds the run and lists what the archive holds so the entries can be ticked, and the ticked ones are the ones kept. With no browser connected it reads the entries box instead, so a headless run never waits. 'the entries box' always reads the names typed below and never holds the run.
actionCOMBO'keep the chosen' answers an archive of the named entries alone. 'remove the chosen' answers everything except them.
hold_timeoutINT6000–86400Seconds to hold the run while waiting for the ticks, so 600 gives ten minutes and 0 waits with no limit. A hold that runs out keeps every entry and says so.
compressionCOMBO'deflate' shrinks entries that compress; 'store' writes them as they are, which suits pictures that are compressed already.

Outputs (3)

NameTypeDescription
zipZIPThe archive holding the chosen entries. Send it to Save ZIP, to a loader, or to another ZIP Manage.
namesARRAYThe entry names the answered archive holds, in its own order.
entry_countINTHow many entries the answered archive holds.