Branchwell

AI Resource Pro / website · airesourcepro.com / content / tutorials / ai-video / comfyui-runpod-agent.mdx

1---
2title: "Set up ComfyUI on Runpod with your agent"
3description: "Six prompts that take Claude Code or Codex from an empty Runpod account to a finished LTX-2.5 clip, with a guide to choosing a quantization and a GPU."
4level: Advanced
5minutes: 11
6publishedAt: 2026-10-31
7updatedAt: 2026-11-01
8video: comfyui-runpod
9videoCaptions: true
10videoUploadedAt: "2026-11-05T07:51:29-08:00"
11---
12
13You can run [ComfyUI](https://github.com/comfyanonymous/ComfyUI) on your own [Runpod](https://www.runpod.io) GPU without clicking through a console. Your agent does the setup through Runpod's official MCP server, and you approve the plan and the price. This guide gives you the six prompts we used on a real account, what happened when we ran them, and how to pick the right model file and the right card.
14
15The example is [LTX-2.5](https://huggingface.co/Lightricks/LTX-2.5), a fast open video model that makes picture and sound together, on an RTX 4090. The 4090 is only an example. A bigger card costs more per hour, has more memory and runs larger models.
16
17## What you need
18
19- Claude Code or Codex
20- A Runpod account with some credit
21- About 20 minutes the first time, and about a minute after that
22
23You don't need a Hugging Face account. Prompt 4 uses public files.
24
25## Why run it yourself
26
27This is private AI. There's no content filter in front of the model, the company that made it never sees your prompts, and the model isn't learning from you. The ComfyUI page loads no analytics SDK, and ComfyUI's code sets `HF_HUB_DISABLE_TELEMETRY` and `DO_NOT_TRACK`.
28
29We checked. Here's the browser's network traffic during one render:
30
31| Host | Requests | What for | Carried the prompt |
32| --- | --- | --- | --- |
33| Our pod | 627 | ComfyUI | Yes |
34| api.comfy.org | 3 | Version check | No |
35| Hugging Face | 3 | Model file check | No |
36
37Here's what that doesn't cover:
38
39- **Your agent.** What you tell your agent during setup goes to that agent's provider. Prompts typed into ComfyUI don't.
40- **The pod's own traffic.** Our test covers the browser. We couldn't capture traffic leaving the pod, so we make no claim about it.
41- **Runpod.** [Runpod's terms](https://www.runpod.io/legal/terms-of-service) say it doesn't actively monitor hosted content, but it may monitor its network, disclose records to satisfy the law, and use content in aggregated, anonymized form to improve its services.
42- **The rules.** No company's filter decides what you can make, but [the model's license](#license-and-rules), Runpod's terms and the law still apply. Runpod's terms ban obscene or otherwise objectionable content by its own judgment.
43
44## How the pieces fit
45
46Your models run on your own Runpod GPU, your agent does the work, and [Runpod's official MCP server](https://docs.runpod.io/get-started/mcp-servers) connects the two. The server gives your agent real tools such as `list-gpu-types`, `create-network-volume`, `create-pod` and `delete-pod`. Runpod's skills come with it, so your agent already knows how ComfyUI runs on a pod.
47
48The MCP server doesn't reach inside a pod. To install a model, your agent connects over SSH.
49
50## Step 1: Connect Runpod
51
52Paste this into your agent. It reads Runpod's official setup page and installs the skills and the MCP server. Signing in is the one part it can't do.
53
54```prompt
55Set up Runpod for this agent by following Runpod's official instructions at https://agents.runpod.io/. Tell me when it's my turn to sign in, then list my pods to confirm it works.
56```
57
58If you'd rather install it yourself, these are the commands from [Runpod's setup page](https://agents.runpod.io/). In Claude Code, run these, then `/reload-plugins`, then sign in with `/mcp`:
59
60```bash
61claude plugin marketplace add runpod/runpod-plugins-official
62claude plugin install runpod@runpod
63```
64
65In Codex:
66
67```bash
68codex plugin marketplace add https://github.com/runpod/runpod-plugins-official.git
69codex plugin add runpod@runpod
70```
71
72<Callout type="note">
73Runpod says not to also run `codex mcp add` after the plugin, because that makes a second entry with its own sign-in. In Codex Desktop, fully quit and reopen the app before the tools appear.
74</Callout>
75
76## Step 2: Deploy ComfyUI
77
78```prompt
79Use Runpod to set up ComfyUI for me on an RTX 4090. Find one that's in stock, create a 100 GB network volume in that same data center, then deploy Runpod's official ComfyUI template on it with SSH turned on. Show me the plan and the hourly price, and wait for my OK before you create anything. Give me the link once ComfyUI actually loads.
80```
81
82An RTX 4090 has 24 GB of video memory and cost $0.89 an hour on Secure Cloud when we ran this, billed by the second. Nothing gets created until you say OK. Stock moves fast: the data center in our plan sold out before we said yes, and our agent moved to another one at the same price. ComfyUI was up about two minutes later.
83
84A network volume matters because a pod's own disk gets wiped when the pod stops. The volume is where your models, your ComfyUI install and your clips live, at $0.07 per GB per month. The pod comes and goes, and the volume stays.
85
86Turning SSH on only works if Runpod has a public key for you. Our account had none registered, so the agent passed a key from our machine and said so in its plan.
87
88<Callout type="warning">
89The ComfyUI link is public, with no login. Anyone who has it can use your GPU, so keep it to yourself.
90</Callout>
91
92<Callout type="warning">
93The template can also open FileBrowser, which ships with a default login anyone can look up, and JupyterLab. Our agent left both closed because we didn't ask for them. If you open FileBrowser, change its password first.
94</Callout>
95
96## Choose a quantization
97
98The full LTX-2.5 model is 42 GB, and that won't fit on a 24 GB card. A model is billions of numbers, and the full version stores each one in 16 bits. Quantizing rounds them to fewer bits, so the file shrinks and you give up some accuracy, like saving a photo at a lower quality.
99
100### Read the file name
101
102- **Q** is the level, roughly the bits per number. Q8 uses about 8, Q4 about 5 and Q2 about 3.
103- **K** is the standard family of GGUF quantization.
104- **M** means medium, a mix of precision across the model.
105- **UD** is Unsloth Dynamic. Instead of one setting for the whole model, Unsloth measured which layers are most sensitive and gave those more bits. UD Q4 is less than half a gigabyte bigger than plain Q4, and it scores like a Q5 that's over a gigabyte and a half bigger.
106
107### Compare the files
108
109The scores come from [Unsloth's model card](https://huggingface.co/unsloth/LTX-2.5-GGUF) and measure each file against the full model. LPIPS is how different it looks to the eye, so lower is better. PSNR measures pixel accuracy, so higher is better. The last column is what happened on our RTX 4090 at 1280 by 704.
110
111| Distilled file | Size | Bits | LPIPS | PSNR | On our 24 GB card |
112| --- | --- | --- | --- | --- | --- |
113| Q2_K | 8.46 GB | 3.22 | 0.567 | 14.8 | Ran, but looks rough and mangled the hand |
114| Q4_K_M | 13.58 GB | 5.17 | 0.352 | 18.1 | Not tested |
115| **UD-Q4_K_XL** | **14.00 GB** | **5.33** | **0.320** | **19.4** | **Our pick. Never failed, about a minute a clip** |
116| Q5_K_M | 15.63 GB | 5.95 | 0.316 | 18.9 | Not tested |
117| UD-Q5_K_XL | 16.00 GB | 6.09 | 0.296 | 20.3 | Ran clean |
118| Q6_K | 17.81 GB | 6.78 | 0.274 | 20.4 | Not tested |
119| Q8_0 | 22.78 GB | 8.68 | 0.242 | 21.6 | Out of memory on the first try, worked on a retry |
120| BF16 | 42.03 GB | 16.01 | Lossless | Lossless | Doesn't fit |
121
122The same prompt and seed won't land on the same image across these files. Changing the numbers changes the result, so compare them for quality and don't expect the same shot.
123
124### Dev or distilled
125
126Dev is the standard version, at 30 steps. Distilled is trained to get there in about 11, so it's roughly three times faster at the same file size. Start with distilled.
127
128### How to choose
129
130Take the file size, add a few gigabytes for everything else, and it should fit in your video memory. On a 4090, that points to Q4 or Q5.
131
132- **Video memory.** UD Q4 peaked at 23.3 to 23.9 GB of 24, and UD Q5 at 22.9. Peaks stayed near the top whichever file we ran, so a clean peak doesn't mean there's room to spare. Q8 is too tight to rely on.
133- **System memory.** It peaked at about 43 GB with UD Q4 and 52 GB with UD Q5, because the text encoder alone is 26 GB. Our pod had over 100 GB.
134- **Headroom.** [Runpod's LTX-2.5 guide](https://www.runpod.io/blog/ltx-2-5-the-open-weights-world-model-built-for-speed-and-how-to-run-it-on-runpod) calls 16 to 24 GB the entry tier and suggests 48 GB for comfortable use.
135
136### Choose a card
137
138We only tested the 4090, so the last column is worked out from memory size, not measured. These are Runpod's Secure Cloud rates from October 31, 2026, and prices and stock change. Network volumes need Secure Cloud, so the cheaper Community rates don't apply here.
139
140| Card | Video memory | Per hour | What it should run |
141| --- | --- | --- | --- |
142| RTX 4090 | 24 GB | $0.89 | UD Q4, tested |
143| RTX 5090 | 32 GB | $1.19 | Q8 with some room |
144| L40 | 48 GB | $0.82 | Q8 comfortably |
145| RTX PRO 5000 | 48 GB | $0.96 | Q8 comfortably |
146| RTX 6000 Ada | 48 GB | $0.99 | Q8 comfortably |
147| H100 NVL | 94 GB | $3.19 | The full 42 GB model |
148| RTX PRO 6000 | 96 GB | $2.49 | The full 42 GB model with room to spare |
149
150To use another card, swap its name in Prompt 2. If you're not sure which file fits, ask your agent. It reads the model card, checks your GPU and tells you what fits.
151
152```prompt
153I want to run LTX-2.5 on this GPU. Read the model card for unsloth/LTX-2.5-GGUF, compare the quantizations that fit in this GPU's memory with room for the text encoder and VAE, and recommend one. Tell me the file size and what I'd give up compared with the full model.
154```
155
156## Step 3: Install the model
157
158Your agent connects over SSH, updates ComfyUI, puts each file in the right folder and renders a test clip to prove it all works. Ours took about 13 minutes. Without the Unsloth line, our agent reached for the official Lightricks files, which sit behind a login, and stopped.
159
160```prompt
161Install the quantization you recommended on my network volume. Use the public files from unsloth/LTX-2.5-GGUF for everything, including the text encoder, VAEs and upscaler, so no login is needed. Update ComfyUI if it's too old for LTX-2.5, install the custom node it needs, and keep all of it on the network volume so it survives a new pod. Render a short test clip through ComfyUI and show it to me, then save the working workflow in ComfyUI's sidebar so I can open it myself.
162```
163
164## Step 4: Render in ComfyUI
165
166Open the link, open your workflows and click the one your agent saved. Four settings matter:
167
168| Setting | What it does |
169| --- | --- |
170| Prompt | What to make |
171| Duration | Length in seconds |
172| Megapixels | The size. 0.5 is a fast preview, and 0.9 is about 1280 wide |
173| Seed | The randomness. Keep it and change one word to compare, or change it for a new take |
174
175Inside, the workflow renders twice: a fast pass at half size, an upscaler, then a short second pass to sharpen it. That's a big part of why it's fast.
176
177Write your prompt like a shot description. Say what's in the frame, what moves, the light and the camera, then describe the sound. This is the one we used for the robot clips:
178
179```prompt
180A small orange robot with round glowing eyes rolls slowly across a sunlit workshop bench, then looks up at the camera and gives a little wave. Warm morning light through a window, dust floating in the air, soft cinematic depth of field. Gentle mechanical whirring and quiet birdsong outside.
181```
182
183LTX takes your sound words literally. Quiet birdsong gave us a clip that was almost silent, about 42 dB down, and a loud drum solo came out at full level.
184
185## What it costs
186
187| Item | Our cost |
188| --- | --- |
189| This pod, with its disk and the volume | About $0.92 an hour |
190| One five-second clip | Under two cents, at about a minute a clip |
191| First render on a new pod | About three minutes while the model loads |
192| Pod left idle overnight | $7.36 for 8 hours |
193| 100 GB network volume | About $7 a month |
194
195The meter runs while the pod sits idle, so shut it down when you're done.
196
197## Step 5: Shut it down
198
199```prompt
200I'm done for today. Terminate my ComfyUI pod, keep the network volume, and show me anything that's still billing.
201```
202
203The pod goes away and the GPU stops billing. Your models stay on the network volume.
204
205## Step 6: Next time
206
207```prompt
208Bring ComfyUI back on my network volume, tell me the hourly price, and give me the link.
209```
210
211Ours was back in about a minute, with ComfyUI, the model and the workflow all still there. Your storage lives in one data center, so if that card is sold out there, you wait or choose another card.
212
213## When it breaks
214
215You don't need to know the fix. Tell your agent what you saw, and ask it to check before it changes anything.
216
217| If you see | Tell your agent |
218| --- | --- |
219| A download needs a login | Use public files. If you need a gated file, add a token yourself and never paste it into chat |
220| A workflow won't load | ComfyUI is probably too old, so update it |
221| A card is sold out | Try another data center or another card |
222| Out of memory | Drop one quantization level or lower the size |
223
224## How we tested this
225
226We ran all six prompts on a live Runpod account on October 31, 2026, and the numbers here come from that run. Two prompts were changed after it. Prompt 4 combines three passes, because we added a line each time the agent stopped. Prompt 6 now asks for the price first, because our agent created the pod before telling us the price. Neither final version has run as one clean pass, so read your agent's plan before you approve it.
227
228## License and rules
229
230LTX-2.5 uses the [LTX-2.x Community License](https://huggingface.co/unsloth/LTX-2.5-GGUF/blob/main/LICENSE), and the terms are worth reading before you publish anything. This is a short summary, not legal advice:
231
232- It's free to use if your entity makes under $10 million a year. At or above that, you need a paid license for commercial use.
233- Its restrictions and [acceptable use policy](https://static.lightricks.com/legal/ltx-acceptable-use-policy.pdf) bar breaking the law, harming minors and deepfakes of people without their consent.
234- It can require you to say a clip is machine-generated.
235
236Running a model yourself doesn't change any of that. [Runpod's terms](https://www.runpod.io/legal/terms-of-service) and [privacy policy](https://www.runpod.io/legal/privacy-policy) apply to your pod too.
237
238## Keep going
239
240Want to do it by hand? [Run open-weight AI video models on Runpod](/ai-video/runpod-open-weight-video) covers the same setup in the console, and [Keep your Runpod bill down when making AI video](/ai-video/runpod-cost-tips) has more ways to spend less per clip.