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

πŸ“€ RH Upload Image

Feed a local image to a cloud workflow β€” RH Upload Image

By xuchenxu168Β·Created 10 months agoΒ·Updated 10 months agoΒ· 7
πŸ“€ RH Upload Image
  • config
  • image
  • previous_params
  • filename
  • params
β—„node_idβ–Ί
β—„field_nameimageβ–Ί
β—„custom_field_nameβ–Ί

RH Upload Image is how you get an image that exists in your local graph up onto RunningHub so a cloud workflow can use it as an input - an init image for img2img, a ControlNet reference, a face for identity, whatever the remote workflow accepts. It's the bridge between "generated/loaded locally" and "needs to exist on their server."

This matters because a cloud workflow can't see your local files. RunningHub only knows files you've uploaded to it. This node takes any ComfyUI IMAGE tensor - from a Load Image node, a local generator, even a previous cloud result sitting in your graph - encodes it as PNG, and POSTs it to the platform's /task/openapi/upload endpoint with your API key.

The two required inputs

  • config - from RH Config.
  • image - any image tensor.

Then the optional trio, which is where the real behavior lives:

  • node_id - the ID of the node inside the RunningHub workflow that should receive this image. Leave it empty and the node still uploads the file, but doesn't attach it to any parameter. That's a legitimate use: pre-warm files on the platform.
  • field_name - which field on that remote node gets it: image, init_image, control_image, mask, reference, or custom. Pick what matches the cloud workflow's actual input.
  • previous_params - the chain input, same as RH Param. If you've built up a params list, wire it in here so this image becomes the next entry in that same chain.

Outputs

Two outputs: filename (the server-side name RunningHub assigned to your upload - useful if you ever need it directly) and params, the growing parameter list to pass into RH Execute. If you set node_id, the upload appends a {nodeId, fieldName, fieldValue} entry with the server filename as the value. If you leave node_id blank, params just passes through whatever came in previous_params.

Gotchas

The hard cap is a 10MB PNG - anything bigger raises a clear error, so downscale before upload if your source is huge. It always uploads PNG (lossless, which is what you want for an init image anyway). And the upload itself has retry logic with backoff, but the endpoint is only as good as your key: a bad key or an unreachable base_url fails here, not later at Execute - which is honestly a nice place to find out.

Install is the standard pack routine: 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, then restart.

CategoryKen-Chen/RH-API

Inputs (6)

NameTypeDefaultDescription
configRH_CONFIGRunningHub configuration from RH_Config node
imageIMAGEImage to upload
node_idoptSTRINGNode ID to set parameter (leave empty to skip parameter setting)
field_nameoptCOMBOimageField name to set (only used if node_id is provided)
custom_field_nameoptSTRINGCustom field name (only used when field_name is 'custom')
previous_paramsoptRH_PARAMSConnect previous params to chain parameters

Outputs (2)

NameTypeDescription
filenameSTRINGβ€”
paramsRH_PARAMSβ€”