Nodes/ComfyUI Sokes Nodes 🦬/Runpod Serverless 🦬
ComfyUI Node

Runpod Serverless 🦬

Call a Runpod serverless LLM from inside your graph (no local VRAM needed)

By m-sokes·Created 3 years ago·Updated 16 days ago· 4
Runpod Serverless 🦬
  • image
  • response_text
  • full_response
  • status
  • execution_time
â—„endpoint_urlhttps://api.runpod.ai/v2/YOUR_ENDPOINT_ID/runâ–º
â—„modelllava:7bâ–º
â—„timeout300â–º
â—„prompt_textDescribe this image in detailâ–º

The name is a little misleading - this node doesn't host anything. What it actually does is let you call a Runpod serverless endpoint from inside ComfyUI and pipe the text response back into your workflow. If you've ever wanted an LLM or vision model that your GPU can't fit (llava, gemma3-27b, whatever) to write captions, summarize prompts, or describe an image mid-pipeline, this is the bridge.

Runpod's serverless product is exactly what it sounds like: you deploy a model as an endpoint and pay per second of actual GPU usage instead of renting a box. The node speaks the standard Runpod v2 API, so it works with any endpoint that follows that shape - you mostly deploy it in the Runpod console and then point this node at it.

How it works

The flow is: it POSTs a JSON payload to endpoint_url with your API key in the Authorization header, gets a job ID back, then polls the status endpoint every couple of seconds until the job is COMPLETED or FAILED. For vision models it converts the connected IMAGE tensor to a base64 PNG and inlines it as a data URL. Text-only requests just skip that step.

It then digs through the response for the actual text - it tries generated_text, response, text, result, content, in that order - because different endpoint handlers name that field differently. That's why you get both response_text (the clean answer) and full_response (the whole JSON dump, pretty-printed).

The inputs that matter

  • endpoint_url - the full run URL for your endpoint, like https://api.runpod.ai/v2/YOUR_ENDPOINT_ID/run. The placeholder value is a fake - replace it or nothing works.
  • model - the model identifier your endpoint's handler expects. Default is llava:7b.
  • timeout - how long to keep polling, in seconds (10–3600, default 300). Generous by default, but an LLM doing a long generation can genuinely take minutes.
  • prompt_text - your prompt. Leave unconnected image for text-only calls.
  • image - connect your IMAGE here for vision models.

Outputs are response_text (STRING), full_response (STRING, raw JSON), status (STRING), and execution_time (FLOAT, seconds). Wire response_text into a text-encoding or prompt node and you've got a captioning loop.

Install

It's part of ComfyUI Sokes Nodes 🦬. Easiest path is ComfyUI Manager - search "ComfyUI Sokes Nodes" and hit Install, then restart. Manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/m-sokes/ComfyUI-Sokes-Nodes.git
pip install -r requirements.txt
# restart ComfyUI

No model downloads - the heavy lifting happens in the cloud. The requests dependency in requirements.txt is the only thing that matters here.

Common issues

  • status comes back "NO_API_KEY" - you forgot the environment variable. Set RUNPOD_API_KEY before starting ComfyUI, and remember the node hashes your key so it re-runs if you change it.
  • "ERROR" with a 404 - wrong endpoint ID in the URL, or the endpoint's deployed.
  • Wrong model name - the model string has to match what your handler checks; a generic 500 usually means it doesn't.
  • Slow - a 300s default timeout is a lot of polling. If your endpoint cold-starts, the first call after idle can take a while. That's Runpod serverless being Runpod serverless, not the node.

One real gotcha: this node makes a network call mid-graph, so it can't run offline, and it's only as good as the endpoint you point it at. The status output makes debugging way easier than most API nodes - check that before blaming your prompt.

CategorySokes 🦬/Integrations

Inputs (5)

NameTypeDefaultDescription
endpoint_urlSTRINGhttps://api.runpod.ai/v2/YOUR_ENDPOINT_ID/run—
modelSTRINGllava:7b—
timeoutINT30010–3600—
prompt_textoptSTRINGDescribe this image in detail—
imageoptIMAGE—

Outputs (4)

NameTypeDescription
response_textSTRING—
full_responseSTRING—
statusSTRING—
execution_timeFLOAT—