← Files Runpod (Official)ARCHIVED FILE
skills/runpod/golden-paths/02-comfyui-pod/variant-b-prebuilt.md
6 KB · Oct 5, 2026 · 18:17 UTC
# Golden path 02 — ComfyUI — Variant B: prebuilt official image
**Status:** COVERED — live-verified 2026-07-07 on pod `7ydkt5vs4fst25` (RTX 4090,
$0.69/hr). **Lane:** runpodctl.
**When to use this variant:** the default. You want ComfyUI up reliably with the
least effort — creation + poll, no SSH install, no `python main.py`. Reach for
[Variant A — from scratch](variant-a-from-scratch.md) only when you need custom
nodes, pinned versions, or a lighter image (see the
[README comparison](README.md#which-variant-should-i-use)).
> Instead of installing ComfyUI onto a PyTorch template, deploy Runpod's
> **official prebuilt ComfyUI image** — ComfyUI + deps + custom nodes are baked in
> and it **auto-starts** on boot. No SSH, no `pip install`, no `python main.py`.
> Per the development loop, this is the "prefer a prebuilt" path
> (`../../../runpod-usage/reference/development-loop.md`).
## Prerequisites
- `runpodctl` installed and `export RUNPOD_API_KEY=your_key`
([`../../../runpodctl/SKILL.md`](../../../runpodctl/SKILL.md)).
- A GPU with ≥16 GB VRAM (RTX 4090 ideal) in the **same DC** as your network
volume.
- Enough container disk for the image (**~150 GB** — larger than a PyTorch base).
## Walkthrough
```bash
export RUNPOD_API_KEY=your_key
runpodctl template search comfyui # discover the official ComfyUI templates
# Official (isRunpod:true): "ComfyUI - CUDA 12.8" id cw3nka7d08 image runpod/comfyui:cuda12.8
# (CUDA 13 / Blackwell / RTX 5090 → use "ComfyUI - CUDA 13" id 2lv7ev3wfp)
```
```bash
runpodctl pod create --name comfyui-prebuilt \
--template-id cw3nka7d08 \ # official prebuilt ComfyUI (CUDA 12.8); auto-starts
--gpu-id "NVIDIA GeForce RTX 4090" --data-center-ids <dc-with-4090-and-volume> \
--ports "8188/http,8080/http,8888/http,22/tcp" \ # 8188 ComfyUI, 8080 FileBrowser, 8888 JupyterLab, 22 SSH
--network-volume-id <volume-id> --volume-mount-path /workspace \ # persist install + models
--ssh --terminate-after <iso8601 a few hours out> # SSH (only for adding a model) + cost guard
```
There is **no install/run step** — ComfyUI is already launched by the image
(`main.py --listen 0.0.0.0 --port 8188 --enable-cors-header`, so bind and CORS are
handled for you).
> For the RTX 5090 / Blackwell / CUDA 13 case, swap the template id to
> `2lv7ev3wfp` ("ComfyUI - CUDA 13") and set `--gpu-id` to the matching GPU.
## Verify it works
Just poll the proxy — no service to start:
```bash
# ~4 min of proxy 502s on FIRST boot (it copies ComfyUI to /workspace on the volume) — keep polling
until curl -sf https://<pod-id>-8188.proxy.runpod.net/system_stats; do sleep 10; done
echo "ComfyUI: https://<pod-id>-8188.proxy.runpod.net"
```
The readiness log line inside the pod is
`[ComfyUI-Manager] All startup tasks have been completed.` Install path is
`/workspace/runpod-slim/ComfyUI`; the launch args file is
`/workspace/runpod-slim/comfyui_args.txt`.
**The checkpoint detail:** the image ships **no model** — `/models/checkpoints`
is empty on boot, so the default graph can't run until you add one. The default
graph references `v1-5-pruned-emaonly-fp16.safetensors`; add exactly that filename
so the graph is usable with no node edits. Two ways to add it:
- **From the UI (easiest for a human):** the prebuilt image bundles
**ComfyUI-Manager**, so when a loaded workflow references a missing model the UI
shows a **blue "download" / missing-models button** that fetches the model
**straight into the correct Runpod folder** — no need to find the URL or the
right `models/` subdirectory yourself.
- **Programmatically (for an agent):** drop the file into
`/workspace/runpod-slim/ComfyUI/models/checkpoints/` over SSH (same filename the
default graph references); ComfyUI rescans on the next `/object_info` request —
no restart needed. Agents use this path since they don't click UI buttons:
```bash
ssh <pod-ssh> 'set -e; cd /workspace/runpod-slim/ComfyUI/models/checkpoints && \
curl -L -o v1-5-pruned-emaonly-fp16.safetensors \
https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly-fp16.safetensors'
```
Then confirm generation the same way as Variant A: POST the default graph to
`/prompt`, poll `/history/<id>`, fetch `/view?filename=<out>&type=output`.
## Variant-specific facts & gotchas
Verified on pod `7ydkt5vs4fst25` (RTX 4090, $0.69/hr):
- **Template:** `ComfyUI - CUDA 12.8`, id `cw3nka7d08`, image
`runpod/comfyui:cuda12.8`, `isRunpod: true` (Runpod-maintained; source
`github.com/runpod-workers/comfyui-base`).
- **CUDA 13 / Blackwell / RTX 5090:** use `ComfyUI - CUDA 13`, id `2lv7ev3wfp`.
- **Ports baked into the template:** `8188` ComfyUI, `8080` FileBrowser
(login `admin` / `adminadmin12`), `8888` JupyterLab (`JUPYTER_PASSWORD`), `22`
SSH.
- **Auto-starts:** yes — `main.py --listen 0.0.0.0 --port 8188 --enable-cors-header`
is already running. Ships ComfyUI 0.26.2, torch 2.10.0+cu128.
- **Boot time:** ~4 min of proxy `502`s on first boot (it copies ComfyUI to
`/workspace` — onto a network volume this copy is the slow part). Readiness line:
`[ComfyUI-Manager] All startup tasks have been completed.`
- **No model ships** (gap vs "usable on first open"). Add a checkpoint via the UI
blue-button or over SSH as above — this is the **only** SSH step needed.
- **Larger image:** 150 GB container disk, plus the ~4-min first-boot copy. In
exchange you skip the entire `git clone` + `pip install --break-system-packages`
+ `setsid … python main.py` block and the PEP 668 / detach gotchas from
Variant A.
- **Shared gotchas still apply:** "Running" ≠ ready (poll the proxy), network
volume ↔ GPU must be the same DC, and the proxy URL is public + unauth. See the
[README's shared gotchas](README.md#cross-cutting-gotchas-shared).
## Cost & cleanup
Shared with Variant A — see [Cost & cleanup in the README](README.md#cost--cleanup-shared).
In short: `--terminate-after` at creation, then `runpodctl pod remove <pod-id>`
and delete the network volume when done.
SHA-256: baab81c50d1be0d015e4ae1b60b986d6e9db7c57bacaa3e9000fa1f6268784f9