π€ RH Batch Upload Image
Batch upload for grid-and-sweep jobs
- config
- image_1
- image_2
- image_3
- image_4
- image_5
- image_6
- image_7
- image_8
- RH_PARAM_BUNDLE
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, ormask. Applied to every uploaded image in the batch.image_1throughimage_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.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| config | RH_CONFIG | β | |
| node_id | STRING | β | |
| field_name | COMBO | 3 options: image, control_image, mask | |
| image_1opt | IMAGE | β | |
| image_2opt | IMAGE | β | |
| image_3opt | IMAGE | β | |
| image_4opt | IMAGE | β | |
| image_5opt | IMAGE | β | |
| image_6opt | IMAGE | β | |
| image_7opt | IMAGE | β | |
| image_8opt | IMAGE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| RH_PARAM_BUNDLE | RH_PARAM_BUNDLE | β |