Skip to content
Black FridayCode BLACK150: 150% on your first deposit of $100 or more, up to $500 bonus. New accounts, until 1 Dec, 00:00 UTC.Get the code
LiteKeep
Sign inDeploy a server

Tutorial, 2026

ComfyUI on a cloud GPU. Your image workflows, on a GPU you rent by the hour.

Most cloud ComfyUI guides put it on a public address with no password. Here’s the private setup, on a GPU you pay for by the hour.

  • 8 min read
  • 4 chapters
  • Updated

NVIDIA L4, 24 GB

Forge L4 = one 2 GB slice, 8% of the card’s memory, yours alone. Processing is shared in turns.

NVIDIA L40S, 48 GB

Forge L40S = one 8 GB slice, 17% of the card’s memory, yours alone. Processing is shared in turns.

The short answer

Clone ComfyUI, install PyTorch and its requirements in a virtual environment, and run python main.py. It listens on 127.0.0.1:8188 by default, which is what you want: ComfyUI has no login, so reach it through an SSH tunnel instead of opening it to the internet.

Its README says it runs on as little as 4 GB of GPU memory, so pick a Forge L40S with 8 GB.

ComfyUI is the node-based tool for image generation workflows. On your own PC it’s limited by your graphics card; on a cloud GPU you rent the card by the hour.

The catch most guides skip: ComfyUI has no user accounts. Put it on a public address and anyone who finds it can use your GPU. This setup keeps it on the server and reaches it through SSH.

In this guide you’ll learn

  • What fits in 2 GB and 8 GB
  • Install ComfyUI in its own environment
  • Reach it privately through an SSH tunnel
  • Run it as a service, and add models

Chapter 1

Pick the GPU: what fits

ComfyUI’s README says it can run even big models on as little as 4 GB of GPU memory and 8 GB of RAM, by moving parts of the model in and out of memory.

ComfyUI on Forge slices
Forge L4Forge L40S
GPU memoryAbout 2 GBAbout 8 GB
Against ComfyUI’s 4 GBBelow itTwice it
System RAM8 GB32 GB
VerdictToo small for image modelsThe one to pick

Bigger image models are slower when they don’t fit in GPU memory, because ComfyUI swaps them. Our GPU guide shows what fits in each slice.

Chapter 2

Install ComfyUI

Check the GPU with nvidia-smi first; on a Forge the driver is already there. Then install as a normal user, not root.

  1. Get ComfyUI and an environment

    sudo apt install -y git python3-venv
    git clone https://github.com/comfyanonymous/ComfyUI.git ~/ComfyUI
    cd ~/ComfyUI && python3 -m venv venv && source venv/bin/activate
  2. Install PyTorch for NVIDIA, then the requirements

    pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130
    pip install -r requirements.txt
  3. Start it

    python main.py

Chapter 3

Open it in your browser, privately

Forward the port over SSH from your own computer:

ssh -N -L 8188:127.0.0.1:8188 you@your-server-ip

Then open http://localhost:8188 in your browser. The connection is encrypted by SSH, and nobody else can reach the interface.

Chapter 4

Keep it running, add models

Make it survive a reboot, and give it models.

  1. Run it as a serviceHow to check: A systemd unit with User= set to your user, WorkingDirectory= set to ~/ComfyUI and ExecStart= pointing at venv/bin/python main.py. Enable it with systemctl enable --now.
  2. Add modelsHow to check: Checkpoints go in models/checkpoints. Download them on the server with wget: inbound traffic is free, and the server’s connection is much faster than uploading from home.
  3. Short on GPU memory?How to check: Start with --lowvram, or --reserve-vram to keep some memory free.

Now it’s your move

ComfyUI on a cloud GPU is a few commands. Keeping it private is one more. Do both, and you have an image studio you rent by the hour.

Deploy a Forge L40S, install ComfyUI, and open it over SSH.