Nodes/RunningHub/RH Image to Image
ComfyUI Node

RH Image to Image

RH Image to Image sends your local image to a cloud workflow and gets a new one back

By liangzheng1128·Created 3 months ago·Updated 3 months ago· 0
RH Image to Image
  • image
  • images
prompt
api_key
base_urlhttps://www.runninghub.cn
workflow_id
negative_prompt
timeout300

RH Image to Image is the "transform what's already in my graph" node. You've got an image tensor sitting in ComfyUI - a render you just made, a reference photo, a screenshot - and you want a RunningHub workflow to transform it with a prompt. Plug the image in, type the prompt, give it a key and workflow ID, and the node uploads your image to the cloud, runs the img2img job, waits, and drops the result back as a fresh IMAGE tensor.

The mechanism is worth understanding because it's where the interesting stuff happens: the node takes your tensor, converts it to RGB bytes, uploads it to RunningHub's /task/openapi/upload endpoint, and then tells the workflow to use that uploaded file. Your local image literally travels to their servers, gets processed, and the output comes back.

The fields that matter

Required:

  • image - an IMAGE tensor from anywhere in your graph. This is the input that makes it img2img rather than txt2img.
  • prompt - the transformation prompt.
  • api_key, base_url, workflow_id - credentials plus the img2img workflow to run. The base_url defaults to .cn; flip to https://www.runninghub.ai if you're international.

Optional:

  • negative_prompt - sent along if filled.
  • timeout (300s default) - cloud-wait budget.

Output: a single images IMAGE tensor. If the workflow returns several images they stack into the batch dimension.

The hardcoded node IDs, again

Same asterisk as RH Text to Image, with one extra. The source bakes in nodeId "6" for the prompt, "7" for the negative, and - new one - "10" for the image field. So this node assumes your workflow's image input node is 10 and its text node is 6. If your img2img workflow was built with different node IDs, the override lands nowhere and you'll get output that ignores your image or prompt, silently. Stock RunningHub img2img templates usually match; anything you hand-built may not. When in doubt, use RH Node Info + RH Execute Workflow and pick the IDs yourself.

Two other things worth knowing. First, only the first image in a batch is uploaded (image[0]) - if you feed it a batch of five, only the first gets processed, so keep batches to one unless you re-run per image. Second, failed or empty runs return a black 64×64 placeholder tensor, the pack's standard failure face - a real "the cloud returned nothing" looks exactly like a legit black image, so check the node's log output before you start debugging your workflow.

Where it fits

This is the convenience node for the "remote heavy lifting, local finishing" pattern: img2img on a big cloud GPU while your local machine handles upscaling, masking, or compositing on the result. The community frame for RunningHub is exactly this - run workflows remotely to try things fast, keep the good ones local. Just remember it's metered: every run costs credits, and your reference image is now on someone else's server.

Install

cd ComfyUI/custom_nodes/
git clone https://github.com/liangzheng1128/ComfyUI-RunningHub
cd ComfyUI-RunningHub
pip install -r requirements.txt

or ComfyUI Manager → search "RunningHub", restart. Light deps: requests, websocket-client, Pillow, numpy.

CategoryRunningHub/Model

Inputs (7)

NameTypeDefaultDescription
imageIMAGEInput image tensor
promptSTRINGText prompt
api_keySTRING
base_urlSTRINGhttps://www.runninghub.cn
workflow_idSTRINGRunningHub workflow ID for image-to-image
negative_promptoptSTRING
timeoutoptINT3001–9999999

Outputs (1)

NameTypeDescription
imagesIMAGE