Image Input
LoadImage with a serving brain
- IMAGE
- MASK
Image Input is what happens when the official LoadImage node gets drafted into API service. In a plain ComfyUI workflow it behaves almost identically to LoadImage - same dropdown of files in your input folder, same upload button - but it's tagged with the ComfyPack/input category, which is the pack's way of saying "this is a request parameter, not just a loader." That one tag is the whole point.
For context: Comfy-Pack is BentoML's toolkit for packaging ComfyUI workflows as reproducible artifacts and serving them as REST APIs. The CPack input nodes define the request body of the served POST /generate endpoint. When a served workflow contains this node, the API accepts an image, stages it into the workflow's input directory, and this node then loads it exactly like LoadImage would. Your img2img workflow becomes an endpoint you can hit from a script, a web form, or a BentoML client.
How it works
It reads the selected file from ComfyUI's input directory, applies the standard PIL pipeline - EXIF orientation fix, RGB conversion - and returns a batch-ready IMAGE tensor. Like LoadImage, it also returns a MASK: if the source has an alpha channel, you get the alpha as a mask (inverted, the ComfyUI convention); if not, you get an empty 64×64 mask tensor. It tracks file changes by hashing the file contents, so ComfyUI knows to re-run when the image changes, and it validates that the file exists before execution.
The one input, two outputs
- image - a dropdown of the images in your input folder, with an upload button. This is the file that becomes the API parameter when served.
- Outputs: IMAGE (the tensor, wire it into your conditioning, VAE encode, or whatever) and MASK (for inpainting-style workflows that need an alpha mask).
That's the whole node. There's no resize, no crop, no color options - just like LoadImage, those are other nodes' jobs.
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.
It drags in BentoML and comfy-cli, so the first install is chunkier than most single nodes.
Where people trip up
The most common confusion is expecting Image Input to do something extra because it's a "ComfyPack" node. It doesn't - locally it's LoadImage with a different color. The serving magic is invisible until you hit /generate. The second gotcha: Comfy-Pack validates that a served workflow has at least one CPack input and one CPack output before it'll start the dev server. An image-in, image-out workflow is the canonical case - Image Input up front, CPackOutputImage at the end, and you've got a working img2img API.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | COMBO | 1 options: example.png |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |