Short answer: a single RTX 4090 (24 GB) runs SDXL comfortably and runs FLUX.1 well if you use the fp8 transformer and an fp8 (or offloaded) T5 text encoder. Full fp16 FLUX on 24 GB works only with offloading and is slower. If you want fp16 FLUX without juggling, look at a 48 GB card instead.

This post walks through how to check that before you pay for anything, how to get ComfyUI running on a rented card, the errors you are most likely to hit, and how to estimate cost from the billing rules rather than from guesses.

Disclosure: we are the CloudGPU team. The VRAM numbers below are plain arithmetic (parameters x bytes), not benchmarks, so they apply on any provider or on your own machine.

1. Will my workflow fit? Do the VRAM math first

Model weights take roughly parameters x bytes per parameter:

Precision Bytes per parameter 1B params ≈
fp32 4 4 GB
fp16 / bf16 2 2 GB
fp8 1 1 GB

Apply that to the pieces of a typical ComfyUI graph:

VRAM estimate for ComfyUI models on a 24 GB card

  • SDXL base (about 3.5B parameters across UNet and text encoders) is around 7 GB in fp16. A 24 GB card has room for higher resolutions, a refiner, ControlNet or batch size above 1.
  • FLUX.1 transformer is about 12B parameters: roughly 24 GB in fp16 and 12 GB in fp8.
  • T5-XXL text encoder used by FLUX is close to 4.7B parameters: about 9.5 GB in fp16 and 4.9 GB in fp8.

On top of weights you need memory for activations, the VAE decode and anything else in the graph (LoRAs, ControlNet, upscalers). A rule of thumb that works for planning: keep the sum of weights at or below about 70–75% of VRAM and you will rarely see out-of-memory errors at 1024x1024.

So for a 24 GB RTX 4090:

Workflow Weights (approx.) Verdict on 24 GB
SDXL + refiner, 1024px ~13 GB Comfortable
FLUX.1 fp8 + T5 fp8 ~17 GB Good
FLUX.1 fp8 + T5 fp16 ~21.5 GB Tight; ComfyUI will offload the encoder
FLUX.1 fp16 + T5 fp16 ~33.5 GB Needs offloading; consider 48 GB
FLUX.1 fp8 + 2 LoRAs + ControlNet ~19–21 GB Usually fine at batch 1

If your graph lands in the last two rows regularly, an RTX 4090 48G or a larger card saves you time fighting memory.

2. Pick the card from the workflow, not the other way around

  • SDXL, SD 1.5, most image LoRA inference: 24 GB is plenty.
  • FLUX.1 in fp8, image editing graphs, short video with small models: 24 GB works.
  • FLUX.1 in fp16, larger video models, many models loaded at once: 32–48 GB or more.

You can compare cards and see current configurations on the RTX 4090 page and the ComfyUI GPU guide.

3. Step by step: ComfyUI on a rented RTX 4090

There are two routes.

Route A — a ComfyUI template. On CloudGPU you can pick the ComfyUI template, choose a GPU and deploy; ComfyUI opens in the browser. Skip to step 4 if you go this way.

Route B — a raw GPU instance with SSH. Useful when you want your own custom nodes and versions.

# 1. Check the GPU and driver nvidia-smi # 2. Get ComfyUI (official repo) git clone https://github.com/comfyanonymous/ComfyUI.git cd ComfyUI python3 -m venv .venv && source .venv/bin/activate # 3. Install a CUDA build of PyTorch that matches the driver, then requirements pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124 pip install -r requirements.txt # 4. Start it on localhost only python main.py --listen 127.0.0.1 --port 8188 

Reach it from your laptop through an SSH tunnel instead of opening the port to the internet:

ssh -N -L 8188:127.0.0.1:8188 root@<instance-host> -p <ssh-port> # then open http://127.0.0.1:8188 locally 

Put model files where ComfyUI expects them:

ComfyUI/models/ ├── checkpoints/ # SDXL / SD checkpoints ├── diffusion_models/ # FLUX transformer (e.g. fp8 file) ├── text_encoders/ # clip_l, t5xxl (fp8 or fp16) ├── vae/ # ae.safetensors for FLUX └── loras/ 

Download with huggingface-cli download <repo> <file> --local-dir models/<folder> and log in first if the repo is gated.

4. Drive it from code (useful for batches)

Export your graph with Save (API Format) and queue it over HTTP:

import json, urllib.request with open("flux_workflow_api.json") as f: graph = json.load(f) graph["6"]["inputs"]["text"] = "a product photo of a ceramic mug, soft light" # node id from your export req = urllib.request.Request( "http://127.0.0.1:8188/prompt", data=json.dumps({"prompt": graph}).encode(), headers={"Content-Type": "application/json"}, ) print(urllib.request.urlopen(req).read().decode()) 

Loop over prompts, let it run, then copy ComfyUI/output/ back with rsync or scp before you shut the instance down.

5. Common errors and fixes

Symptom Likely cause Fix
torch.cuda.OutOfMemoryError at sampling Weights + activations exceed VRAM Switch to fp8 transformer/encoder, lower batch size or resolution, or start with --lowvram
OOM only at the end VAE decode at high resolution Use the tiled VAE decode node
CUDA error: no kernel image is available PyTorch build does not match the GPU/driver Reinstall PyTorch for the CUDA version nvidia-smi reports
Red nodes after loading a workflow Missing custom nodes Install them (e.g. with ComfyUI-Manager), restart
Error while deserializing header Truncated download Delete the file and download again; compare file size with the repo
Page loads but queue never starts Wrong port or tunnel not running Check `ss -ltnp

6. Estimating cost without guessing

Don't hard-code a number from a blog post — rates change. Use the formula with the current rate from the pricing page:
{% raw %}

per-minute offer: cost ≈ billed_minutes × (hourly_rate / 60) hourly offer: cost ≈ ceil(hours_used) × hourly_rate billed_minutes = model download + setup + generation + copying results off 

Two practical points from the CloudGPU billing rules:

  1. Some configurations bill by the minute and refund unused prepaid minutes when you destroy the instance; others bill each started hour in full. The quote shows which one you are getting before you confirm, so read it.
  2. Download and setup time count. Keeping model files ready (or using a template) shortens the billed part of a short session.

A quick worksheet for a batch job:

Step Your estimate
Download weights ___ min
Install nodes / warm-up ___ min
Images × seconds per image ___ min
Copy outputs ___ min
Total billed minutes ___

Measure seconds per image on the first few images, then multiply out the batch. That number plus the rate gives a realistic budget.

7. Summary

  • Do the weight math first: SDXL is easy on 24 GB, FLUX fits in fp8, fp16 FLUX wants 48 GB or offloading.
  • Use a template if you just want the UI; use SSH + a tunnel when you need custom nodes.
  • Most errors are memory, CUDA build mismatch or missing nodes.
  • Budget with billed minutes × current rate, and include download time.

If you want to try it, the RTX 4090 page shows current configurations; stock is whatever /deploy shows at the moment.

The author is from the CloudGPU team.