Nodes/ComfyUI-YogurtNodes/Save Bytes Bridge (Yogurt Nodes)
ComfyUI Node

Save Bytes Bridge (Yogurt Nodes)

Save Raw Bytes (Not Just Images) to Your Output Folder

By yogurt7771·Created 2 years ago·Updated 9 days ago· 1
Save Bytes Bridge (Yogurt Nodes)
  • bytes_data
  • bytes_data
  • path
output_dir
filename_prefixComfyUI
overwritefalse
suffix.pkl
custom_suffix

ComfyUI has a save node for images, one for masks, even one for text. Raw bytes - the thing you get from API downloads, serialized pickles, audio blobs - have nowhere to go by default. YogurtSaveBytesBridge is that missing sink: it takes a BYTES value and writes it to disk where you can actually find it.

The inputs, in the order you'll actually touch them:

  • bytes_data - the bytes to save.
  • filename_prefix - the file's name prefix (default "ComfyUI"). It supports formatting tokens like %date:yyyy-MM-dd%, so you can get date-stamped filenames for free.
  • output_dir - where to write, relative to ComfyUI's output folder. Leave blank for the default output directory.
  • overwrite - "true" or "false". Whether an existing file at the target name gets replaced.
  • suffix - the extension: .pkl, .dat, .bin, or "Custom".
  • custom_suffix - if you pick "Custom", the extension you want here (and this field wins over suffix when it's set).

Outputs: the original bytes_data passes through, plus path - the absolute path of the file you just wrote, which is the useful one to wire elsewhere.

What it's actually for

Think of the pack's own serialization flow: YogurtSerializeAny pickles a Python object into bytes, and this node saves those bytes as a .pkl. Later, YogurtDeserializeAny reads it back. That's a full save/restore path for arbitrary graph state. The same node saves files pulled down by the pack's API image nodes, or any binary blob a node hands you.

The path output matters because downstream steps often want the location, not the data - feed it into a text log, an "upload this file" step, or just a YogurtSaveTextBridge to record where things went.

Install

Ships in ComfyUI-YogurtNodes:

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

or install ComfyUI-YogurtNodes via ComfyUI Manager and restart. It's under "Yogurt Nodes"; the display name includes the "(Yogurt Nodes)" suffix. No models, no API keys.

The only real gotcha is overwrite. Batch-generate files with the same prefix and overwrite off, and later runs will have to make the filename unique instead of clobbering the earlier files - which is usually what you want, but it means the path output isn't a stable constant across runs. If you're writing a known filename for a downstream consumer, set overwrite to true and accept the collision risk.

CategoryYogurtNodes/IO

Inputs (6)

NameTypeDefaultDescription
bytes_dataBYTESThe bytes data to save.
output_dirSTRINGThe directory to save the bytes data to, leave blank to save to the ComfyUI output directory.
filename_prefixSTRINGComfyUIThe prefix for the file to save. This may include formatting information such as %date:yyyy-MM-dd%.
overwriteCOMBOfalseOverwrite existing files.
suffixCOMBO.pklThe file extension to save the bytes data as.
custom_suffixSTRINGThe file extension to save the bytes data as. If this is not empty, the suffix option will be ignored. Otherwise, the suffix option will override above suffix option.

Outputs (2)

NameTypeDescription
bytes_dataBYTES
pathSTRING