Nodes/Protoface/Protoface Save File
ComfyUI Node

Protoface Save File

The node that saves the things Save Image can't touch

By protoface-ai·Created 22 days ago·Updated 13 days ago· 0
Protoface Save File
  • file
  • path
◄filename_prefixProtoface►

ComfyUI's Save Image node wants an IMAGE tensor. An SVG is not a tensor. A GLB is not a tensor. A transcript, a transparent PNG with an alpha channel you actually care about, a .gltf the provider happened to return instead of .glb - none of those are tensors. Protoface Save File exists to get those originals onto disk with a sane name, and it's a two-input node.

What it does

It copies one original artifact from the Protoface result cache into ComfyUI's output/ directory and gives you back the path. That's it. No re-encoding, no conversion, no thumbnail - the bytes the provider sent, with the file extension derived from the response's content type.

That last part is more useful than it sounds. Every Protoface generation node has a files output described in the README as "every original downloaded asset, including transparent PNGs and non-media artifacts." The typed outputs (image, vector, model.3d, video) are ComfyUI-shaped views of those assets; files is the thing itself. When the two disagree - and for SVG and 3D they do - files wins on fidelity, because it's the actual file.

The two inputs

file (PROTOFACE_FILE) takes a generation node's files output. Those are lists, and ComfyUI maps downstream nodes over lists, so one Save File node handles a multi-result job: it runs once per artifact. If you want only some of them, one Save File per interesting socket is usually more legible than filtering the list.

filename_prefix defaults to Protoface. It is sanitised hard before use: everything outside [A-Za-z0-9_-] becomes an underscore, and the string is capped at 100 characters. So "my shoot/hero shot" lands as my_shoot_hero_shot. Then a short random hex is appended, giving you something like my_shoot_hero_shot_9f2c81b4d0.glb.

That random suffix is deliberate and it's the one behaviour to plan around: the filename is never exactly your prefix. Each run mints a new one, so re-running a graph doesn't overwrite yesterday's export. Good for safety, mildly annoying when a downstream script expects a fixed path - which is what the output socket is for.

The output

path is a STRING containing the absolute path of the written file, and the node also shows it in its own UI panel so you can copy it without opening the console. It's an output node, so ComfyUI will execute it as part of the graph even if nothing is wired downstream.

Where it goes: into a text note if you're logging runs, into a file-writing node if you're building an index, or nowhere at all - a lot of the time you just want the file in output/ and the path is a nice-to-have. For a 3D workflow, the honest pattern is Save File to disk, then import the file into whatever actually previews meshes; the pack deliberately doesn't guess at a mesh viewer.

Install

cd ComfyUI/custom_nodes
git clone --branch v0.1.0 --depth 1 https://github.com/protoface-ai/protoface-comfyui.git protoface
python -m pip install -r protoface/requirements.txt

Or ComfyUI Manager → search Protoface → install protoface-nodes → restart → reload the browser. Requires ComfyUI 0.41.0+ and Python 3.10+; the dependencies (httpx, jsonschema, Pillow, av) come from requirements.txt and must go into ComfyUI's own interpreter - the classic "node missing after install" is a system-Python pip that never touched the portable environment. Then key in via the Protoface button bottom-right, or PROTOFACE_API_KEY / PROTOFACE_API_KEY_FILE for a server.

Traps

The extension follows the provider, not your hopes. A 3D job can come back as GLB, GLTF, OBJ, STL, PLY or FBX depending on what the model produced, and this node saves what arrived. The README says it plainly: a 3D file's actual format is authoritative, and a GLB-only downstream node may need a conversion step. Check the extension before you file a bug.

Don't confuse it with Save Image. Save Image would give you a flattened, colour-managed PNG of the tensor. Here you get the provider's original - which is what you want for an SVG you'll edit in Illustrator, or a transparent PNG where the alpha is the point.

It copies, it doesn't clean up. Files accumulate: the pack's cache under PROTOFACE_STATE_DIR (default ~/.cache/protoface-comfyui) keeps the job's artifacts and your output/ folder keeps this copy. Neither is auto-pruned. If you're batching a hundred jobs, go clear output/ on a schedule, and leave the state directory alone - it's what makes resume and deduplication work.

CategoryProtoface/Utilities

Inputs (2)

NameTypeDefaultDescription
filePROTOFACE_FILE—
filename_prefixSTRINGProtoface—

Outputs (1)

NameTypeDescription
pathSTRING—