Nodes/ComfyUI-FileHub/File Hub Saver
ComfyUI Node

File Hub Saver

Save to output/, input/, or a loader's pin — File Hub Saver makes the download-and-reupload round trip optional

By redswoop·Created 4 months ago·Updated 4 months ago· 0
File Hub Saver
  • images
  • path
filename_prefixFileHub
embed_metadatatrue
target{"destination":"output"}

SaveImage writes to output/, full stop. That's fine until you're working on a remote ComfyUI instance and the next step in your workflow needs an image in input/ - at which point you're downloading your own output and re-uploading it like some kind of courier. File Hub Saver, the sibling node in the ComfyUI-FileHub pack, is a drop-in for SaveImage that lets you pick where the file lands: output/, input/, or both. One click, no round trip.

What it does differently

The whole point is the destination. On a remote box, saving straight to input/ means the next run's loader finds it instantly - the download-and-reupload loop only exists because the stock save node never gives you the option. There's also a both mode (write to output/ for your gallery and input/ for the pipeline) and a skip mode, which no-ops the save so you can leave the node in a workflow but switch it off per-run without bypassing.

The flashier trick: pick a target loader and a slot in the widget, and the saver pushes the just-saved file straight into a File Hub Loader's pin over ComfyUI's existing websocket. That's a "save → next-run pinned input" feedback loop with no manual file shuffling. If you've built any kind of img2img loop, you'll feel that one immediately.

How it works

The target widget is just a JSON string - {"destination":"output"} by default - that the backend parses. It writes via the same folder_paths.get_save_image_path machinery core uses, into the directory you asked for, and embeds the prompt plus workflow JSON as PNG tEXt chunks exactly like SaveImage does (that's the same metadata-your-workflow-is-the-project-file convention covered in the KB's image-io-metadata doc). For the pin push, it fires a filehub.pin_update websocket event that the loader's frontend listens for.

The inputs that matter

  • images (IMAGE) - what you're saving.
  • filename_prefix (STRING) - supports subfolders (myproj/img_), %width% / %height%, date tokens, and %NodeName.field% to pull values from other nodes, e.g. %Empty Latent Image.width%. Same template language as SaveImage's prefix.
  • embed_metadata (BOOLEAN) - true by default. Turn it off when sharing, for privacy, or when the workflow metadata is big enough to bloat the file.
  • target (STRING) - the JSON: destination (output / input / both / skip), plus optional loader_id and slot for the pin push. The widget hides it and gives you a real UI.

Output is a single path (STRING) - the absolute path of what was written, which you can thread into downstream nodes. And yes, it's an output node, so it always runs and the cache works backward from it, same as SaveImage.

Install

Same as its sibling - clone the pack, restart, search for "File Hub Saver":

cd ComfyUI/custom_nodes
git clone https://github.com/redswoop/ComfyUI-FileHub.git

No Python dependencies beyond what ComfyUI already has; no models to download.

Where people get burned

  • Input saves don't show up in the loader's recents list - the pack deliberately doesn't surface input/ writes in the standard images UI list, so don't go hunting for them in the output gallery.
  • Big workflows can bloat your PNGs. This pack actually raises PIL's MAX_TEXT_MEMORY to 512 MB at import because ComfyUI-saved PNGs embed the whole prompt+workflow JSON in tEXt chunks, and oversized chunks make /view throw "Too much memory used in text chunks." If you share files from a heavy workflow, embed_metadata off is your friend - the file slims down and your prompt stops being public record.
  • It's a young pack. Tested against ComfyUI 0.19.x / frontend 1.42.x. The target widget is DOM-rendered, so if you're on a much older frontend, expect it to misbehave rather than to fail gracefully.
Categoryimage

Inputs (4)

NameTypeDefaultDescription
imagesIMAGEImages to save.
filename_prefixSTRINGFileHubFilename prefix. Supports subfolders ('myproj/img_'), %width% / %height%, %year% / %month% / %day% / %hour% / %minute% / %second%, %date:yyyy-MM-dd% custom formats, and %NodeName.field% to pull values from other nodes (e.g. %Empty Latent Image.width%).
embed_metadataBOOLEANtrueEmbed prompt + workflow JSON into PNG tEXt chunks. Disable for privacy when sharing, or when the workflow metadata is large enough to bloat the file.
targetSTRING{"destination":"output"}

Outputs (1)

NameTypeDescription
pathSTRING