Nodes/ComfyUI_RH_API/πŸ“€ RH Batch Upload Image
ComfyUI Node

πŸ“€ RH Batch Upload Image

Batch upload for grid-and-sweep jobs

By xuchenxu168Β·Created 10 months agoΒ·Updated 10 months agoΒ· 7
πŸ“€ RH Batch Upload Image
  • config
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • RH_PARAM_BUNDLE
β—„node_idβ–Ί
β—„field_nameβ–Ύβ–Ί

RH Batch Upload Image is the pack's answer to "I have 8 starting images and I want the cloud to run the workflow once per image." It's the batch sibling of RH Upload Image: instead of one image becoming one parameter, up to eight images each become their own separate task run.

The mental model is the key thing. In the pack's batch system, a "parameter bundle" is a list of parameter sets - think "a list of jobs," where each job is a full set of nodeId/fieldName/fieldValue entries. This node builds exactly that: every image you feed it becomes one job. Then RH Batch Execute submits each job as its own cloud task, and RH Download collects the results in parallel. End result: a sweep across 8 init images without babysitting anything.

Inputs

  • config - from RH Config. Required.
  • node_id - the target node inside the RunningHub workflow. Required, and here it's mandatory in practice: the node returns an empty bundle with a console error if you leave it blank. Makes sense - a batch where nothing knows where to put the images is a batch of nothing.
  • field_name - dropdown: image, control_image, or mask. Applied to every uploaded image in the batch.
  • image_1 through image_8 - all optional IMAGE inputs. Only the connected ones get uploaded; the rest are skipped.

The single output is RH_PARAM_BUNDLE - the list-of-jobs - which wires straight into RH Batch Execute. Note this node is only a bundle-builder; it uploads files and structures jobs but never creates a task.

How it works

For each connected image it encodes to PNG, uploads to /task/openapi/upload, and appends [ {nodeId, fieldName, fieldValue: <filename>} ] as one job in the bundle. Failed uploads print an error and skip that run rather than killing the batch. If zero images upload, you get a warning and an empty bundle.

Gotchas

Every run in the batch shares the same node_id and field_name - this node is for "same slot, different image," not "image 1 goes to node A, image 2 to node B." That's RH Multi-Input Image's job instead. Also, an empty or failed batch doesn't raise; it quietly returns an empty bundle, and Batch Execute will then complain about "invalid or empty" params. So watch the console output for the per-image upload status. And remember this is the upload half - you still need Batch Execute to actually spend the credits, so a big sweep is N cloud tasks, one per image, each billed.

Install: ComfyUI Manager (search ComfyUI_RH_API) or git clone https://github.com/xuchenxu168/ComfyUI_RH_API.git into custom_nodes + pip install -r requirements.txt, restart.

CategoryKen-Chen/RH-API

Inputs (11)

NameTypeDefaultDescription
configRH_CONFIGβ€”
node_idSTRINGβ€”
field_nameCOMBO3 options: image, control_image, mask
image_1optIMAGEβ€”
image_2optIMAGEβ€”
image_3optIMAGEβ€”
image_4optIMAGEβ€”
image_5optIMAGEβ€”
image_6optIMAGEβ€”
image_7optIMAGEβ€”
image_8optIMAGEβ€”

Outputs (1)

NameTypeDescription
RH_PARAM_BUNDLERH_PARAM_BUNDLEβ€”