Serving Input Image
Get the attached image into your graph as a tensor
- serving_config
- default_image
- IMAGE
ServingInputImage is the node that makes image-to-image work over your bot: it takes the image a user attached to their command and hands it to your workflow as a proper IMAGE tensor, ready for a VAE Encode, a ControlNet preprocessor, an IPAdapter, or whatever else your graph expects. Before this node existed, the pack's README told you to grab the attachment URL as text and download it with a separate node - this one does the whole job internally and was added specifically to remove that friction.
The mechanism is a straight shot: the entry point node (Discord, Telegram, HTTP, or WebSocket) exposes the first attached file as attachment_url_0 in the serving config. ServingInputImage downloads that URL, decodes the bytes with OpenCV, converts the color space, normalizes to 0–1 floats, and emits a [1, H, W, C] tensor. What you get out is a bog-standard ComfyUI IMAGE - the same shape Load Image produces - so anything downstream that works with a loaded image works with this.
The optional default_image input is the part that makes it a fallback instead of a hard requirement. If the request has no attachment, the node returns default_image instead of failing. That's the pattern for building one workflow that does both txt2img and img2img: wire a placeholder image (or the output of an image generator) into default_image, and the same branch handles "user attached a photo" and "user just typed a prompt." The author's own announcement of this node hyped exactly that txt2img-and-img2img-without-thinking setup, and it's a genuinely nice ergonomic.
If there's no attachment and no default_image, the node does two things worth knowing about: it sends the text reply "This command requires an image" back through the serving layer, and it calls ComfyUI's interrupt_processing to stop the run rather than let a broken graph continue. So the failure mode is a polite message to the user, not a half-executed workflow. If you want to opt out of that interrupt, give it a default.
Inputs: serving_config (required) and default_image (optional). Output: IMAGE.
Install is the shared pack install - ComfyUI Manager, or git clone into custom_nodes + pip install -r requirements.txt. The image decoding path depends on opencv-python, which the pack already lists in its requirements, so this node is covered by the standard install rather than adding anything new. Standing rule included: Auto Queue on, or the node won't be around to catch the next attachment.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| serving_config | SERVING_CONFIG | — | |
| default_imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |