Nodes/ComfyUI INOUT/Schema Image Parameter
ComfyUI Node

Schema Image Parameter

Filename in, saved render out

By Liquid-XO·Created 6 months ago·Updated 5 months ago· 0
Schema Image Parameter
  • value_in
  • value
nameparameter_name
io_kindinput
description
requiredtrue
accepted_formats
filename_prefixoutput
save_formatwebp
quality90

If an agent is going to run your workflow like an API, images are the awkward part. Text and numbers inject trivially - but the input image needs to get from the agent into your graph, and the render needs to get back out as a file the agent can grab. This node is the door for both directions: set io_kind to input and it loads a filename into a real IMAGE tensor for img2img or a video first-frame; set it to output and it takes the tensor from your VAEDecode and writes an actual file to ComfyUI's output folder.

It's the most capable node in ComfyUI_SchemaNodes, and the one where input and output modes genuinely differ in behavior - the string, int, float and bool nodes are mostly pass-through, but this one does real conversion work.

The inputs that matter

  • io_kind - this is the whole node. input mode converts a filename → IMAGE tensor. output mode converts a tensor → saved file.
  • name / description - the stable identifier and the machine-readable description. For an input image, describe what it should be: "Reference photo of the subject, frontal view."
  • value_in - in input mode, this is where the filename comes in. It's typed * so it accepts a string (a filename in ComfyUI's input folder) or a ComfyCloud-style {filename, subfolder, type} dict from an MCP upload. In input mode there is no default - leave value_in empty and the node raises a "requires a filename" error. You must wire something in.
  • filename_prefix - the base name for saved files in output mode (default output).
  • save_format - webp (default), png, or jpg. WebP is the default because it's much smaller than PNG for the same pixels.
  • quality - 1–100, default 90; applies to WebP and JPEG, ignored for PNG.
  • accepted_formats - optional metadata listing allowed extensions (one per line). It's a declaration for your tool, not a runtime filter.

How it works

In input mode, the node resolves the filename and calls ComfyUI's folder_paths machinery to load the image into a [1, H, W, C] float tensor - wire value into anything expecting an IMAGE, like a VAEEncode or a LoadImage-adjacent input. If value_in is already a tensor (from another node), it passes it through untouched. In output mode, it takes a tensor, saves it to the output folder with the standard counter-based filename (<prefix>_00001.webp), and also passes the tensor through so you're not forced to dead-end your graph at the node.

Two implementation notes worth knowing. First, the save path uses ComfyUI's own get_save_image_path machinery, so it honors %width%/%height% template variables and plays nice with the counter system - a Windows filename crash from an early version is fixed. Second, JPEG has no alpha: the node converts RGBA to RGB automatically if you pick jpg. Output files land in ComfyUI/output, ready for the agent (or you) to collect.

Installing it

Same one-install story as the whole pack.

cd ComfyUI/custom_nodes
git clone https://github.com/Liquid-XO/ComfyUI_SchemaNodes

Restart ComfyUI, or use ComfyUI Manager (search "ComfyUI SchemaNodes"). No pip dependencies, no models, no API keys - this pack does all its file work through ComfyUI's own bundled folder_paths and PIL.

Common gotchas

  • Input mode with no value_in is a hard error, not a silent default. The node raises ValueError: Input image '...' requires a filename. If you're testing in the UI, remember you have to feed it a filename; it's not a standalone image picker.
  • The README is stale on outputs. It still talks about a SCHEMA_FIELD metadata output; the current code (commit 8e5676d) returns only the typed value. Your schema parser reads the declarations from the workflow JSON widgets, not from a second output.
  • Don't confuse this with ComfyUI's own SaveImage. This node does not embed the full workflow in the PNG the way SaveImage does - it's a plain save via the same folder machinery. If you want drag-back-onto-canvas PNGs, keep a SaveImage in the graph too.
Categoryinout/schema

Inputs (9)

NameTypeDefaultDescription
nameSTRINGparameter_name
io_kindCOMBOinput2 options: input, output
descriptionSTRING
requiredBOOLEANtrue
accepted_formatsSTRING
filename_prefixSTRINGoutput
save_formatCOMBOwebp3 options: webp, png, jpg
qualityINT901–100
value_inopt*

Outputs (1)

NameTypeDescription
valueIMAGE