How-to guides

Run ComfyUI on a cloud GPU: setup guide

To run ComfyUI on a cloud GPU, rent a card with enough VRAM for your models (24 GB for SDXL, 32 to 48 GB for FLUX.1 at full precision), clone the Comfy-Org repository, install PyTorch with CUDA and the requirements, put checkpoints in models/checkpoints and start python main.py. Keep the default 127.0.0.1 binding and open the UI through an SSH tunnel.

NEURAMESH / COMPUTE FIELD NOTES00 / 10

Prerequisites: which GPU and how much VRAM

ComfyUI is a node-based interface for diffusion models. It runs on one GPU, and the deciding number is VRAM, because the diffusion model, its text encoders and the VAE all want to sit in GPU memory at once. ComfyUI will offload to system RAM when they do not fit, but every offload costs time on each image.

Size from the weight files. The SDXL base checkpoint on Hugging Face is a 6.94 GB file, so a 24 GB card such as the RTX 4090 holds it with room for large batches and upscalers. The FLUX.1 [dev] transformer file is 23.8 GB on its own, before the text encoders, so on a 24 GB card ComfyUI must offload. A 32 GB RTX 5090 or a 48 GB L40S keeps more of a FLUX workflow resident. The GPU for image generation guide covers the trade-offs in depth, and FLUX.1 GPU requirements goes model by model.

Beyond the GPU you need a Linux instance with the NVIDIA driver already loaded, SSH access, Python 3.13 (the ComfyUI README calls it very well supported), and 100 GB or more of disk if you plan to keep several checkpoints, LoRAs and outputs.

Prerequisites: which GPU and how much VRAM
WorkloadWeights on diskStarting GPU
SDXL base, 1024 px6.94 GB checkpoint24 GB, e.g. RTX 4090
SDXL with ControlNet and upscalerCheckpoint plus extra models24 to 32 GB
FLUX.1 [dev] at full precision23.8 GB transformer plus encoders and VAE32 to 48 GB, e.g. RTX 5090 or L40S
Video models and long batchesVaries by model48 GB or more

References: ComfyUI GitHub repository README · Hugging Face: stabilityai/stable-diffusion-xl-base-1.0 files · Hugging Face: black-forest-labs/FLUX.1-dev files · NVIDIA GeForce RTX 4090 specifications · NVIDIA GeForce RTX 5090 specifications · NVIDIA L40S specifications

Step 1: check the machine and create an environment

Log in over SSH and run nvidia-smi. It should list the GPU you rented, its total memory and a driver version. If it errors or shows the wrong card, stop and raise it with the provider before installing anything.

Create an isolated Python environment so ComfyUI and its custom nodes do not fight with system packages: python3 -m venv ~/comfy-venv, then source ~/comfy-venv/bin/activate. Every later pip command runs inside this environment. If you prefer containers, the same steps work inside a CUDA image once the NVIDIA Container Toolkit is set up, as described in Docker with NVIDIA GPUs.

References: NVIDIA System Management Interface

Step 2: install PyTorch and ComfyUI

Install PyTorch first. The ComfyUI installation document gives the stable NVIDIA command as pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130. The README states that Torch 2.7 is the minimum supported version and that NVIDIA 20 series and newer cards need cu130 or above, so do not reuse an old wheel.

Then clone and install ComfyUI: git clone https://github.com/Comfy-Org/ComfyUI.git, cd ComfyUI, and pip install -r requirements.txt. The project has moved to the Comfy-Org organization; old guides that point at a personal account still redirect, but use the current URL in scripts.

There is also a CLI route: pip install comfy-cli followed by comfy install. It is convenient, but the manual steps above make it obvious which PyTorch build you have, which helps when something breaks.

References: ComfyUI GitHub repository README · ComfyUI installation document

Step 3: download models into the right folders

ComfyUI looks for checkpoints in models/checkpoints and VAEs in models/vae inside the ComfyUI folder. If your models live on a separate persistent volume, point ComfyUI at it with an extra_model_paths.yaml file (the repository ships an example) instead of copying files around.

The Hugging Face CLI is the simplest downloader on a headless server. Install it with curl -LsSf https://hf.co/cli/install.sh | bash, sign in with hf auth login for gated models such as FLUX.1 [dev], then fetch one file into place: hf download stabilityai/stable-diffusion-xl-base-1.0 sd_xl_base_1.0.safetensors --local-dir models/checkpoints.

Keep models on a disk that survives the instance stopping. Re-downloading 20 GB or more at every restart wastes paid GPU time; storage and egress costs explains how to price a persistent volume against that.

References: ComfyUI GitHub repository README · Hugging Face Hub documentation: command line interface · Hugging Face: stabilityai/stable-diffusion-xl-base-1.0 files

Step 4: start ComfyUI with the right flags

Start the server with python main.py --port 8188 --disable-auto-launch. By default ComfyUI listens on 127.0.0.1 and port 8188, which is what you want behind an SSH tunnel. The README advises starting without performance flags, saying many flags people recommend have the opposite effect, so add memory flags only when you have a reason.

Run it under tmux, screen or a systemd service so it survives your SSH session closing. The table lists the flags from the official startup-flags reference that matter most on a rented card. The VRAM mode flags are mutually exclusive; pick at most one.

Step 4: start ComfyUI with the right flags
FlagDefaultUse it when
--listen [IP]127.0.0.1; with no value binds all interfacesOnly behind an authenticated proxy; never bare on a public IP
--port8188Another service already uses 8188
--highvramOffThe card is large and you want models kept in GPU memory
--lowvram / --novramOffWorkflow does not fit; trades speed for memory
--reserve-vram GBOS-dependentAnother process shares the GPU
--cuda-device IDUnsetPin ComfyUI to one GPU on a multi-GPU machine
--extra-model-paths-config PATHUnsetModels live on a separate volume
--disable-auto-launchOffHeadless server; no browser to open
--tls-keyfile / --tls-certfileOffYou must serve HTTPS directly

References: ComfyUI documentation: startup flags · ComfyUI GitHub repository README

Step 5: secure access with an SSH tunnel

The startup-flags reference does not describe any login for the web UI, so treat the port as open to anyone who can reach it. Anyone who can load the page can queue jobs on your GPU, read your outputs and, through custom nodes, potentially run code. Do not use --listen on a machine with a public IP unless an authenticated reverse proxy or VPN sits in front.

The safe default is an SSH tunnel. From your laptop run ssh -N -L 8188:localhost:8188 user@your-gpu-host, then open http://localhost:8188 in your browser. The OpenSSH manual describes -L as forwarding a local port to a host and port on the remote side, and -N as not running a remote command, which is what you want for pure port forwarding. Add -f to send it to the background.

Close the provider firewall for every port except SSH. If teammates need access, give each one SSH keys and the same tunnel command, or put ComfyUI behind a proxy with TLS and per-user authentication.

References: ComfyUI documentation: startup flags · OpenSSH ssh(1) manual

Common errors when you run ComfyUI on a cloud GPU

Most failures come from a mismatched PyTorch build, missing models or memory pressure. Check the console where main.py runs first; ComfyUI prints the device and VRAM it detected at startup.

Common errors when you run ComfyUI on a cloud GPU
SymptomLikely causeFix
ComfyUI starts on CPU or says CUDA is unavailableCPU-only or old PyTorch wheelReinstall torch with the cu130 index URL inside the venv
Torch not compiled with CUDA enabledpip pulled the default wheelUninstall torch, reinstall from the CUDA index
CUDA out of memory mid-workflowModels plus activations exceed VRAMLower batch or resolution, try --lowvram, or a larger card
Checkpoint list is emptyFiles in the wrong folderMove to models/checkpoints or set extra_model_paths.yaml
Red missing-node boxes after loading a workflowCustom nodes not installedInstall the nodes, or test with --disable-all-custom-nodes
Browser cannot connectTunnel not running or wrong portRestart ssh -N -L 8188:localhost:8188 and check --port
Black imagesVAE precisionRemove --fp16-vae; the docs warn it can cause black images

References: ComfyUI GitHub repository README · ComfyUI installation document · ComfyUI documentation: startup flags

Illustrative cost of a ComfyUI session

The numbers below are illustrative, not quotes. Assume a 24 GB card at $0.70 per GPU-hour and a 48 GB card at $1.40 per GPU-hour. A three-hour exploration session costs $2.10 or $4.20; leaving the instance running overnight for 12 more idle hours adds $8.40 or $16.80, more than the work itself.

Billing counts the hours the GPU is allocated, not the hours you click Queue, so the biggest saving is stopping the instance when you finish. GPU-hour cost explained walks through the arithmetic. Current NeuraMesh rates are on GPU prices.

Illustrative cost of a ComfyUI session
Scenario (assumed rate)HoursCost
24 GB card at $0.703 active$2.10
48 GB card at $1.403 active$4.20
24 GB card left idle overnight12 idle$8.40
48 GB card, 40-hour batch week40$56.00

Checklist and next step

nvidia-smi shows the rented GPU. PyTorch installed from the CUDA index inside a venv. ComfyUI cloned from Comfy-Org and requirements installed. Models on a persistent volume in models/checkpoints and models/vae. Server bound to 127.0.0.1 and reached by SSH tunnel. Firewall closed except SSH. Instance stopped when the session ends.

When you know the VRAM your workflow needs, rent the card that fits. On NeuraMesh you choose the GPU, a plan, GPU count, hours and region, for example on the RTX 4090 rental page, and receive a confirmed quotation, typically within one business day, with nothing charged until you approve. Not sure which card fits? Ask the compute advisor.

NeuraMesh prices for these GPUs

NeuraMesh prices per GPU-hour in USD, excluding taxes, as of 2026-11-27. Live prices are on the rental pages.
GPUMemoryData centerValue
RTX 409024 GB$0.46$0.40
L40S48 GB$1.26$0.54
A10080 GB$1.56$0.98
H10080 GB$2.88$2.00

Every order is confirmed in a quotation before you pay. See all GPU prices.

Questions readers ask

How much VRAM do I need to run ComfyUI on a cloud GPU?

For SDXL, a 24 GB card is comfortable: the base checkpoint is a 6.94 GB file. For FLUX.1 [dev] at full precision the transformer alone is 23.8 GB, so a 32 to 48 GB card avoids heavy offloading. Smaller cards work with --lowvram at a speed cost.

Is it safe to use --listen on a cloud server?

Not on its own. With no value, --listen binds every interface, and the startup-flags reference documents no login for the UI. Keep the default 127.0.0.1 binding and use an SSH tunnel, or put an authenticated reverse proxy or VPN in front.

What port does ComfyUI use?

Port 8188 by default, set with --port. Forward that port through SSH with ssh -N -L 8188:localhost:8188 user@host and open http://localhost:8188 locally.

Why does ComfyUI run on the CPU on my GPU server?

Usually PyTorch was installed without CUDA support. Inside the same environment, reinstall torch, torchvision and torchaudio from the CUDA index URL given in the ComfyUI installation document, then restart and check the device line in the startup log.

Where do I put LoRAs and VAEs?

VAEs go in models/vae and checkpoints in models/checkpoints; other model types have their own subfolders under models. If you keep models on a separate disk, map them with extra_model_paths.yaml rather than copying them.

Sources and editorial notes

Primary documentation reviewed November 24, 2026. Provider descriptions reflect published documentation. Recommendations are our analysis; worked figures are illustrative unless explicitly stated otherwise. No independent provider benchmark or uptime ranking is claimed.

Read the editorial policy.

Need this GPU? Rent it from NeuraMesh: choose a GPU and plan, get a confirmed quotation, and pay only when you approve. See pricing.