Nodes/ComfyUI-aihub-workflow-exposer/AIHub Expose Image Batch
ComfyUI Node

AIHub Expose Image Batch

A whole batch of images plus per-frame metadata

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Expose Image Batch
  • normalizer
  • IMAGE
  • MASKS
  • METADATA
  • WIDTH
  • HEIGHT
idexposed_image_batch
labelImage Batch
tooltip
typeupload
minlen0
maxlen1000
index0
metadata_fields
metadata_fields_label

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, or upload (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 as AIHubExposeInteger.
  • 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_frames or prompt_at_frame STRING MULTILINE MAXLEN:100. Types are INT, FLOAT, BOOLEAN, STRING; modifiers do sorting, uniqueness, and min/max validation (including referencing another exposed value like MAX: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 Normalizer to 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.

Categoryaihub/expose

Inputs (10)

NameTypeDefaultDescription
idSTRINGexposed_image_batchA unique custom ID for this workflow.
labelSTRINGImage BatchThis is the label that will appear in the field.
tooltipSTRINGAn optional tooltip
typeCOMBOuploadThe source of the image batch
minlenINT0
maxlenINT1000
indexINT0This value is used for sorting the input fields when displaying; lower values will appear first.
metadata_fieldsSTRINGA 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_labelSTRINGA 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.
normalizeroptAIHUB_NORMALIZERThe 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)

NameTypeDescription
IMAGEIMAGE
MASKSMASK
METADATAAIHUB_METADATA
WIDTHINT
HEIGHTINT