Tutorial Updated May 2026

How to Run ComfyUI on RunPod

Time Required
5 minutes with one-click template. 20 minutes manual setup.

What You'll Need

  • A RunPod account (free to sign up)
  • A payment method (credit/debit card or PayPal)
  • Basic familiarity with ComfyUI (helpful but not required)

Method 1: One-Click Template (Recommended)

This is the fastest way. RunPod has a community template with ComfyUI pre-installed.

Step 1: Sign Up

Create a RunPod account at RunPod. Add a payment method to your account.

Step 2: Deploy the Template

  1. Log in to RunPod and go to "Pods"
  2. Click "Deploy"
  3. Under "Community Cloud", search for "ComfyUI"
  4. Select the most popular ComfyUI template (usually the one with the most runs)
  5. Choose a GPU: RTX 4090 for best performance, A4000 for budget
  6. Set disk size to at least 50GB (models take space)
  7. Click "Deploy"

Step 3: Access ComfyUI

Once the pod is running (usually under 2 minutes):

  1. Click "Connect" on your pod
  2. Click the "ComfyUI" HTTP port (usually port 8188)
  3. ComfyUI opens in your browser. Start generating.

Step 4: Stop When Done

Click "Stop" on your pod when you're finished. You stop paying immediately.

Method 2: Manual Setup

If you want full control or need custom nodes:

Step 1: Deploy a Base Pod

  1. Go to "Pods" → "Deploy"
  2. Select "PyTorch" template or a bare Ubuntu image
  3. Choose your GPU
  4. Deploy and connect via JupyterLab or SSH

Step 2: Install ComfyUI

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

Step 3: Download Models

Place models in the appropriate folders:

  • Checkpoints: ComfyUI/models/checkpoints/
  • VAE: ComfyUI/models/vae/
  • LoRAs: ComfyUI/models/loras/
  • ControlNet: ComfyUI/models/controlnet/

Step 4: Launch ComfyUI

python main.py --listen 0.0.0.0 --port 8188

Then connect via the exposed port in RunPod's interface.

Tips for Cost Efficiency

  • Use persistent network storage. Store models on a network volume so you don't re-download them for every pod.
  • Stop pods when idle. You're billed by the second while the pod runs.
  • Start with A4000 or RTX 3090. Upgrade to 4090 or A100 only if you actually need the speed.
  • Use serverless for APIs. If you're serving an API, use RunPod Serverless instead of keeping a pod running.

Common Issues

  • "CUDA out of memory": Use a GPU with more VRAM, enable tiled VAE, or reduce image resolution. For SDXL at 1024x1024, you need at least 8 GB VRAM. For Flux at 1024x1024, 12 GB is the practical minimum.
  • "Model not found": Check that models are in the correct subfolder. ComfyUI is strict about paths. The file extension must match what ComfyUI expects (.safetensors or .ckpt for checkpoints).
  • "Port not accessible": Make sure you're using RunPod's "Connect" button, not trying to access localhost.
  • "Custom nodes fail to import": Many custom nodes need additional Python packages. Check the node's GitHub page for requirements and install them with pip install -r requirements.txt inside the custom node folder.
  • Slow generation speed: Ensure you're using the correct attention optimization. For NVIDIA GPUs, xformers or Flash Attention 2 can speed up generation by 20-40%.

Choosing the Right GPU for ComfyUI

Not every ComfyUI workflow needs an RTX 4090. Picking the wrong GPU wastes money; picking one with too little VRAM wastes time on failed generations. Here's how to match GPU to workflow:

Workflow Min VRAM Recommended GPU RunPod Cost/hr
SD 1.5, 512x512 4 GB RTX A4000 ~$0.44
SDXL, 1024x1024 8 GB RTX 3090 / A4000 ~$0.44-0.46
SDXL + ControlNet 10 GB RTX 4090 ~$0.69
Flux.1 [dev], 1024x1024 12 GB RTX 4090 ~$0.69
Flux + ControlNet 16 GB A100 40GB ~$1.39
High-res batch (4+ images) 24 GB+ RTX 4090 / A100 80GB ~$0.69-1.49

Real Cost Math: What ComfyUI on RunPod Actually Costs

Cloud GPU pricing can be deceptive if you only look at the per-hour rate. Here's what a typical ComfyUI session costs in practice:

Scenario: SDXL workflow, 100 images at 1024x1024

  • GPU: RTX 3090 at $0.46/hr on RunPod
  • Generation speed: ~8 seconds per image (30 steps, Euler a)
  • Total generation time: ~13 minutes
  • Setup + model load: ~3 minutes
  • Total session time: ~16 minutes = 0.27 hours
  • Cost: $0.46 × 0.27 = ~$0.12

Scenario: Flux.1 [dev], 50 images at 1024x1024

  • GPU: RTX 4090 at $0.69/hr
  • Generation speed: ~15 seconds per image (20 steps, distilled)
  • Total generation time: ~12.5 minutes
  • Model load (larger): ~4 minutes
  • Total session time: ~17 minutes = 0.28 hours
  • Cost: $0.69 × 0.28 = ~$0.19

Monthly estimate (hobbyist, 3 sessions per week):

  • 12 sessions × $0.15 average = ~$1.80/month
  • Network storage (50 GB models): ~$5.00/month
  • Total: ~$6.80/month — cheaper than a single fast-food meal

Monthly estimate (creator, daily 2-hour sessions):

  • 30 sessions × 2 hours × $0.69 (RTX 4090) = ~$41.40/month
  • Network storage (100 GB): ~$10.00/month
  • Total: ~$51.40/month — competitive with local GPU electricity + depreciation

Model Management Best Practices

ComfyUI workflows often need multiple models: checkpoints, VAEs, LoRAs, ControlNet processors, and IP-Adapter models. Managing these efficiently saves both time and money:

  • Use network volumes for model storage. A 50 GB network volume costs ~$5/month but eliminates the 5-10 minute model download time every session. At $0.69/hr for an RTX 4090, saving 10 minutes of download time pays for 7+ GB of storage.
  • Organize by project. Create subfolders on your network volume: /models/sdxl/, /models/flux/, /models/loras/. Symlink them into ComfyUI's expected folder structure.
  • Cache commonly used checkpoints. Keep your top 3-5 checkpoints on the network volume. Download experimental models to temporary pod storage and delete them after testing.
  • Use safetensors when available. They load faster and use less temporary disk space than .ckpt files.

Installing Custom Nodes

ComfyUI's power comes from its custom node ecosystem. On RunPod, you install them the same way as locally:

cd ComfyUI/custom_nodes
git clone https://github.com/author/node-name.git
cd node-name
pip install -r requirements.txt

Then restart ComfyUI. Essential custom nodes for most workflows:

  • Comfyroll Studio: Utility nodes for logic, loops, and batch processing
  • WAS Node Suite: Image processing, text manipulation, and file operations
  • ComfyUI-Manager: Install and update other custom nodes from within the UI
  • ControlNet Auxiliary Preprocessors: Canny, depth, pose, and lineart preprocessors
  • ComfyUI-Impact-Pack: Detailer, wildcard, and mask processing nodes

Performance Optimization Tips

  • Enable attention optimizations. Add --use-pytorch-cross-attention or install xformers for 20-30% speedup on NVIDIA GPUs.
  • Use FP16 / BF16 precision. Most modern checkpoints support half-precision, cutting VRAM usage in half with minimal quality loss.
  • Batch your generations. Generating 4 images in one batch is faster than 4 separate single-image generations because model loading happens once.
  • Reduce preview frequency. ComfyUI's live preview updates every step. Setting preview to every 5-10 steps reduces CPU overhead.
  • Use tiled VAE for high resolution. At 1536x1536 or above, tiled VAE prevents OOM errors with minimal quality impact.

Security on Shared Cloud GPUs

RunPod Community Cloud uses shared hardware. While Secure Cloud is single-tenant, follow these practices regardless:

  • Never store API keys or credentials in pod storage. Use environment variables injected at runtime.
  • Delete sensitive outputs before stopping. Pod storage may persist briefly between sessions.
  • Use HTTPS for all API calls. RunPod's exposed ports use HTTPS by default — do not bypass this.
  • Enable pod termination protection. Prevent accidental deletion of long-running training or batch jobs.

When to Use RunPod Serverless Instead

If you're building an app or API that serves ComfyUI workflows to users, keeping a pod running 24/7 is expensive. RunPod Serverless is the better architecture:

  • Pay only for inference time, not idle GPU hours
  • Auto-scales from 0 to N workers based on queue depth
  • Cold starts of 8-15 seconds for cached images
  • Ideal for Discord bots, web apps, and batch processing pipelines

The trade-off is setup complexity: you must package your ComfyUI workflow as a Docker container with a handler function. For personal use and experimentation, pods are simpler. For production APIs, serverless is almost always cheaper.

Frequently Asked Questions

Can I use my local ComfyUI workflows on RunPod?

Yes. Export your workflow as JSON from local ComfyUI, upload it to your RunPod instance, and load it via the "Load" button. All node names and connections port directly. Custom nodes must be installed first.

How do I transfer generated images from RunPod to my computer?

Use the "Connect" panel in RunPod to open JupyterLab, then navigate to ComfyUI/output/ and download files. For batch workflows, mount an S3-compatible bucket or use rclone to sync outputs automatically.

Is RunPod faster than Google Colab for ComfyUI?

Yes, significantly. Colab Free gives you a T4 (16 GB VRAM) with frequent disconnects and queueing. Colab Pro+ is $50/month for unreliable A100 access. RunPod's RTX 4090 at $0.69/hr delivers 2-3x the inference speed of a T4 with no session limits.

Can I run ComfyUI with multiple GPUs?

ComfyUI itself does not natively distribute workloads across GPUs. However, you can run separate ComfyUI instances on different GPUs and load-balance between them. For true multi-GPU training or inference, use RunPod's cluster features or switch to a framework like InvokeAI.

What happens if my pod gets interrupted?

On Secure Cloud, interruptions are rare and usually announced. On Community Cloud, hosts can reclaim GPUs. Save your workflow JSON and checkpoint outputs to network storage regularly. For critical jobs, use Secure Cloud or enable automatic checkpointing every N iterations.

Related Guides

Start Generating on RunPod

Deploy ComfyUI in under 5 minutes with a one-click template. No setup headaches, no driver conflicts — just pick a GPU and start creating.

Launch ComfyUI on RunPod →