Runpod Serverless 🦬
Call a Runpod serverless LLM from inside your graph (no local VRAM needed)
- image
- response_text
- full_response
- status
- execution_time
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
imagefor 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
statuscomes back "NO_API_KEY" - you forgot the environment variable. SetRUNPOD_API_KEYbefore 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
modelstring 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.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| endpoint_url | STRING | https://api.runpod.ai/v2/YOUR_ENDPOINT_ID/run | — |
| model | STRING | llava:7b | — |
| timeout | INT | 30010–3600 | — |
| prompt_textopt | STRING | Describe this image in detail | — |
| imageopt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| response_text | STRING | — |
| full_response | STRING | — |
| status | STRING | — |
| execution_time | FLOAT | — |