AIHub Expose Image Batch
A whole batch of images plus per-frame metadata
- normalizer
- IMAGE
- MASKS
- METADATA
- WIDTH
- HEIGHT
AIHub Expose Image Batch is the heaviest node in the expose family, and the README says as much: "one of the most complex nodes meant to be used from video generation, handling, and lora training." Where AIHubExposeImage hands over a single layer, this one takes a series of images from the external app and packs them into a batched IMAGE tensor - the shape ComfyUI wants for video-to-video, image batch training runs, or generating several frames in one pass.
The mechanism is the same protocol as all the other exposes: an AIHub client (over the pack's websocket, port 8111) uploads the images, the server drops them into a temp directory and injects the file list as hidden inputs, and this node turns them into one tensor plus a MASKS tensor. Standalone in the web UI, it has nothing to grab. That's by design.
The inputs that matter
- type -
all_frames,all_layers_at_image_size, orupload(default). The client uses it to know what to send: every frame of a video, every layer of the document at a uniform size, or a fresh upload batch. - minlen / maxlen - the allowed batch size, so a client can't feed you 3 images when the workflow needs 16. You can even bind these to another expose's value via
minlen_expose_id/maxlen_expose_id(plus offsets), same live-linking trick asAIHubExposeInteger. - metadata_fields - the standout feature. This is a newline-separated mini-language that attaches per-image data to the batch. Each line is
[field_id] [TYPE] [MODIFIERS...], e.g.frame_number INT SORTED MAX:total_framesorprompt_at_frame STRING MULTILINE MAXLEN:100. Types areINT,FLOAT,BOOLEAN,STRING; modifiers do sorting, uniqueness, and min/max validation (including referencing another exposed value likeMAX:total_frames). The companion metadata_fields_label input supplies human labels for the same fields in order. - normalizer - hand it the output of
AIHub Utils New Normalizerto resize the batch to a consistent width/height before it becomes a tensor (video models like LTXV are picky about this).
Outputs
IMAGE (the batch), MASKS, WIDTH, HEIGHT, and METADATA - a custom AIHUB_METADATA object carrying each image's JSON payload. That metadata output is what makes training setups work: AIHub Utils Metadata Map can turn it into a single string (e.g. "0,48,97" for LTXV frame indexes), but the README is blunt that anything more complex - "like that on creating loras from image batches" - needs a custom node, because plain graph wiring won't cut it.
Install & gotchas
Same pack, same install: ComfyUI Manager → search ComfyUI-aihub-workflow-exposer, or git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer into custom_nodes, then restart. No requirements.txt, no model downloads.
Where people get burned: the metadata syntax. A typo in metadata_fields - wrong modifier name, a MAX: pointing at an expose id that doesn't exist - and you'll chase phantom errors. Validate against the README's exact grammar, and remember metadata fields that reference another value (like MAX:total_frames) require that value to be an actually-exposed integer or project integer. Also: batches of wildly different image sizes will trip up downstream models; use the normalizer input rather than hoping the client sent uniform frames.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| id | STRING | exposed_image_batch | A unique custom ID for this workflow. |
| label | STRING | Image Batch | This is the label that will appear in the field. |
| tooltip | STRING | An optional tooltip | |
| type | COMBO | upload | The source of the image batch |
| minlen | INT | 0 | — |
| maxlen | INT | 1000 | — |
| index | INT | 0 | This value is used for sorting the input fields when displaying; lower values will appear first. |
| metadata_fields | STRING | A newline separated list of metadata fields to include in the metadata JSON for each image in the batch, add a space with the type next to it, if not specified it will be considered integer, valid types are: INT, FLOAT, STRING and BOOLEAN. A second space and further allows for specifying modifiers, valid modifiers are SORTED, UNIQUE, NONZERO, MULTILINE. for BOOLEAN it is also possible to use ONE_TRUE and ONE_FALSE as modifiers. It is also possible to add numeric validity modifiers with a colon, for example MAX:100, MAXOFFSET:100, MAXLEN:100, MAXLEN:OFFSET, MIN:0, MINOFFSET:0, MINLEN:0 OR MINLENOFFSET:0 But also a property name provided that property exist in the project and is an expose integer or expose project integer for MAX, MAXLEN, MIN and MINLEN For example: 'frame_number INT SORTED MAX:total_frames prompt_at_frame STRING MULTILINE MAXLEN:100' | |
| metadata_fields_label | STRING | A newline separated list of labels for the metadata fields to include in the metadata JSON for each image in the batch. Must match the number of metadata fields. | |
| normalizeropt | AIHUB_NORMALIZER | The method to use for normalizing the images in the batch, if not specified it will use the image with the most megapixels as the target size with a nearest-exact upscaler |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASKS | MASK | — |
| METADATA | AIHUB_METADATA | — |
| WIDTH | INT | — |
| HEIGHT | INT | — |