Nodes/Quality of Life Nodes for ComfyUI/Extract Zip To Output (Soze)
ComfyUI Node

Extract Zip To Output (Soze)

Unzip straight into ComfyUI's output folder, from inside the graph

By SozeInc·Created 2 years ago·Updated 8 days ago· 10
Extract Zip To Output (Soze)
    • destination_folder
    • extracted_count
    • skipped_count
    • status
    zip_filepath
    folder_path
    overwrite_existingfalse

    Sometimes your workflow's real output isn't an image or a video - it's a bundle of files. A remote API hands you a zip, an automation step packs a dozen generated assets together, and what you actually want is that zip exploded into ComfyUI's output directory so everything lives in the usual place. Extract Zip To Output is a tiny node that does exactly that, from inside the graph, and reports back where things landed.

    It's the file-handling corner of the Soze QoL pack, which also carries loaders, savers and folder tools. This one is unglamorous and quietly useful - especially at the end of a pipeline that assembles files before the final "extract" step.

    How it works

    Three inputs, all required, all boring:

    • zip_filepath - absolute path to the .zip you want extracted. If it's empty the node just skips with a status message. If the file isn't a valid zip, you get a clear error instead of a silent partial extract.
    • folder_path - the destination inside the output dir. Leave it blank and the zip explodes into the output root; give it a name and the archive lands in <output_dir>/<that name>, created if needed.
    • overwrite_existing - False by default, meaning files that already exist are skipped. Flip it on and existing files get replaced.

    The security touch worth knowing: the node refuses "zip-slip" paths - archive entries written with ../ tricks that try to escape the destination folder. That's a real attack pattern in zip handling, and it's handled rather than documented.

    Outputs: destination_folder (the full path it extracted to - wire this into a log or a filename builder), extracted_count (files written), skipped_count (existing files left alone), and status. The node is an output node, so it doesn't need anything downstream to run.

    When you'd use it

    • End of a ComfyDeploy-style pipeline where a remote job returns an archive and you want it unpacked next to your other outputs.
    • Batch asset prep: zip up reference packs, drop the node in, and every run syncs the unpacked files into output.
    • Any time you want ComfyUI to do the unzipping instead of you leaving the graph to open a terminal.

    Where people get burned: expecting it to extract anywhere on disk. The destination is deliberately anchored to ComfyUI's output directory - if you need files elsewhere, extract outside ComfyUI instead of fighting it. And keep overwrite_existing off unless you actually want repeats of an existing filename clobbered; a rerun of the same workflow otherwise double-reports skips, which reads as an error but isn't.

    Installing it

    Same as the rest of the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SozeInc/ComfyUI_Soze.git
    pip install -r ComfyUI_Soze/requirements.txt
    

    Or install "ComfyUI_Soze" via ComfyUI Manager and restart. Pure Python - no dependencies beyond the standard library's zipfile, no API keys, no model files. Look for "Extract Zip To Output (Soze)" under the soze category.

    Categorysoze

    Inputs (3)

    NameTypeDefaultDescription
    zip_filepathSTRINGAbsolute path to the .zip file to extract.
    folder_pathSTRINGDestination folder under the ComfyUI output dir. Leave blank to extract into the output dir root.
    overwrite_existingBOOLEANfalseIf False, files that already exist are skipped.

    Outputs (4)

    NameTypeDescription
    destination_folderSTRING
    extracted_countINT
    skipped_countINT
    statusSTRING