File Input
Pass a file path into your served workflow
- path
File Input is the Comfy-Pack node for when your API parameter isn't a value but a location. Where its siblings hand you a string, an int, or an image tensor, this one hands you a file path - and unlike Image Input, it doesn't read the file, it just carries the path. If your served workflow needs to point at an arbitrary file that isn't an image, this is the node.
Comfy-Pack, if you're new to it, is BentoML's toolkit for turning ComfyUI workflows into reproducible artifacts and REST APIs. The ComfyPack input nodes define the request body of the served POST /generate endpoint, and the node's name becomes the API parameter name. So a File Input node named input_audio means your API call sends "input_audio": "...".
How it works
It takes a single path string (default empty) and returns it unchanged - an identity function, exactly like String Input. The difference is what happens when the workflow is served: Comfy-Pack treats CPack path inputs as Path-typed fields in the API schema, and uploaded files are written into the workflow's input directory before the graph runs, so the path this node emits actually resolves to something on disk. In a plain local workflow it does nothing but pass a string through, which is fine - that's what you want from an annotation node.
The one input
- path - a string, default empty. Wire whatever produces the path (a node that returns a file location) into it, or leave it as the default and let the API fill it in.
Output is a single path value, typed * so it can connect to nodes that expect a filename or path string. Note it's marked with a forceInput-style behavior in spirit - you generally want this fed by something, not typed by hand.
Install
Standard pack install:
- ComfyUI Manager: search
comfy-pack, Install, restart, refresh. - Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/bentoml/comfy-pack, restart.
BentoML plus comfy-cli make it heavier than most nodes, but again - one-time cost.
The honest take
This is a niche node, and that's okay. Most served workflows want images, strings and ints, and this one exists for the long tail: pointing a workflow at an audio file to transcribe, a caption file to load, a reference document. The trap is confusing it with File Output - that one goes the other direction and copies a produced file into the output folder so the API can return it. If you wire them the wrong way round you'll get a served workflow that accepts paths but returns nothing. Keep the direction straight: Input means "the client hands you a path," Output means "you hand the client a file."
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| path | * | — |