Nodes/ComfyUI Deploy/File Output (ComfyDeploy)
ComfyUI Node

File Output (ComfyDeploy)

Ship any file out of a deployed workflow — zips, PSDs, CSVs, whatever

By BennyKok·Created 3 years ago·Updated 10 months ago· 1,529
File Output (ComfyDeploy)
      file_path
      output_idoutput_file

      The image output nodes handle PNGs and EXRs, but deployed workflows don't always finish with a picture. Sometimes they finish with a zip of upscaled variants, a .psd for a Photoshop pipeline, a CSV of prompt metadata, or a saved intermediate a customer wants to download. "File Output (ComfyDeploy)" is the escape hatch: you give it a path to any file on the machine and it uploads that file to ComfyDeploy so your API caller can download it.

      It fills the gap for workflows where an earlier custom node writes something to disk that isn't an image - a composite script, a packaged batch, a trained model artifact. Without it, that file would just sit on the server, invisible to whoever called your API.

      How it works

      The node takes a file_path, checks it's legit (more on that below), and if the file isn't already inside the ComfyUI output folder, it symlinks it into output/temp (copying as a fallback if symlinks aren't allowed). Then it reports the file to the backend with an output_id, and the uploader pushes it to your dashboard storage.

      A genuinely nice touch: the node looks at the file extension to decide which bucket it lands in on the UI - .png/.jpg/.webp/.exr count as images, .wav/.mp3 as audio, .txt/.json/.md/.csv as text files, .zip/.psd/.psb as generic files. So a zip comes back tagged as a file, not an image.

      Inputs

      • file_path - required. The path to the file to output and upload. It's marked forceInput, meaning you should wire it from a node that produces a path, rather than typing it by hand.
      • output_id - default output_file. Your API response's key for this artifact.

      No outputs - it's a terminal node.

      Installing it

      Same pack install as everything in ComfyUI Deploy:

      cd ComfyUI/custom_nodes
      git clone https://github.com/BennyKok/comfyui-deploy.git
      

      Restart ComfyUI (or install "ComfyUI Deploy" from ComfyUI Manager). No model downloads, no extra heavy deps beyond the pack's usual pip list.

      Where people get burned

      Security is the headline, and it's deliberate: the node refuses to touch anything outside ComfyUI's base or temp directories, and it blocks .. path traversal outright. If your file lives somewhere unusual - say /home/user/projects/result.zip - the upload silently does nothing and logs a warning. Keep anything you want to export inside ComfyUI's folders, or write it there first with a temp-save node.

      Second gotcha: the file has to exist when the node runs. If you wired file_path to a node that writes asynchronously or hasn't executed yet, you get an empty result and a "File not found" warning in the console. Order your graph so the writer runs first. And remember - it's a path-based output, so the node has no idea what's in the file. Naming matters; the caller sees your output_id, not your intent.

      Category🔗ComfyDeploy

      Inputs (2)

      NameTypeDefaultDescription
      file_pathSTRINGPath to the file to output and upload.
      output_idoptSTRINGoutput_file

      Outputs (0)

      No outputs