ComfyUI on a Cloud GPU: Run Stable Diffusion and FLUX Remotely (2026)
ComfyUI is a node-based workflow editor for Stable Diffusion and FLUX. It is more powerful and flexible than AUTOMATIC1111, with a steeper learning curve. The catch: SDXL wants 12GB+ VRAM, and FLUX wants 24GB+. Most consumer GPUs fall short. The solution: run ComfyUI on a cloud GPU server and access it via SSH tunnel or reverse proxy. This guide covers setup on a fresh GPU server, model management, essential workflows, and remote access. For hosting, Liquid Web offers GPU VPS with RTX 4090, A100, and H100 options.
What is ComfyUI? A node-based Stable Diffusion interface where you wire loaders, samplers, and output nodes into custom pipelines. You can build multi-step workflows (inpaint → upscale → refine) that AUTOMATIC1111 cannot express. Perfect for production image pipelines and automation. See ComfyUI + n8n to trigger generation from workflows.
Get a Liquid Web GPU server → | Apify for image data pipelines →
What Is ComfyUI and Why Cloud GPU?
ComfyUI uses a node-based graph instead of a single form. You connect nodes for loading models, setting samplers, applying LoRAs, and saving outputs. This enables complex workflows that would require scripting in AUTOMATIC1111.
Why cloud GPU?
- SDXL needs ~12 GB VRAM. FLUX.1 needs ~24 GB for comfortable generation.
- Consumer GPUs (RTX 3060, 3070) often lack enough VRAM or slow down with large batch sizes.
- A rented GPU server gives you RTX 4090, A100, or A10G on demand — no upfront hardware cost.
Liquid Web GPU VPS provides these tiers with hourly or monthly billing.
Setup on a Fresh GPU Server
Prerequisites: Ubuntu 22.04, NVIDIA driver installed, nvidia-smi working.
# Verify GPU
nvidia-smi
1. Clone ComfyUI
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
2. Create virtual environment
python3 -m venv venv
source venv/bin/activate
3. Install dependencies
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
pip install -r requirements.txt
For FLUX and SDXL, the default requirements are usually sufficient. ComfyUI Manager adds extra nodes — we'll cover that next.
4. Run ComfyUI with remote access
python main.py --listen
--listen binds to 0.0.0.0, so ComfyUI is reachable from outside localhost. Default port is 8188.
SSH Tunnel for Secure Access
Exposing ComfyUI directly to the internet can be risky. Use an SSH tunnel:
ssh -L 8188:localhost:8188 user@YOUR_SERVER_IP
Keep this SSH session open. On your local machine, open http://localhost:8188. All traffic goes through the encrypted SSH tunnel.
Essential Nodes and ComfyUI Manager
ComfyUI Manager lets you install custom nodes from a catalog. It's the first add-on to install:
- Open ComfyUI in the browser.
- Click Manager (or install via git:
cd custom_nodes && git clone https://github.com/ltdrdata/ComfyUI-Manager.git). - Restart ComfyUI.
- Use Manager to search and install nodes (e.g. ControlNet, upscalers).
Common nodes: Load Checkpoint, KSampler, VAE Decode, Save Image, Load LoRA.
FLUX.1 Workflow Example
A minimal FLUX workflow:
- Load Checkpoint — Point to your FLUX checkpoint (
flux1-dev.safetensorsor similar) inmodels/checkpoints. - CLIP Text Encode (Prompt) — Your positive prompt.
- CLIP Text Encode (Negative) — Negative prompt (optional).
- Empty Latent Image — Width 1024, height 1024 (or 768 for SD 1.5).
- KSampler — Steps 28–35, cfg 3.5–5, sampler
eulerordpmpp_2m. - VAE Decode — Connect KSampler output.
- Save Image — Output directory and filename.
Wire: Checkpoint → KSampler; Prompt → KSampler; Empty Latent → KSampler → VAE Decode → Save Image.
SDXL Workflow with LoRA
- Load Checkpoint — SDXL base (e.g.
sd_xl_base_1.0.safetensors). - Load LoRA — Select LoRA file from
models/loras. Set strength (0.7–0.9 typical). - CLIP Text Encode — Prompt. SDXL supports longer prompts.
- Empty Latent Image — 1024×1024 for SDXL.
- KSampler — Steps 25–30, cfg 7–8.
- VAE Decode → Save Image.
Place LoRA files (.safetensors) in ComfyUI/models/loras/. For API-driven automation, ComfyUI + n8n lets you trigger workflows from webhooks without touching the UI.
Port Forwarding and Reverse Proxy
For team access without SSH tunnels, expose ComfyUI via a reverse proxy:
- Nginx — Proxy
https://your-domain.comtohttp://localhost:8188. Add Basic Auth or OAuth if needed. - Traefik — Use Traefik v3 for automatic HTTPS and routing.
- Cloudflare Tunnel — Free HTTPS tunnel without opening ports; useful for quick sharing.
Never expose ComfyUI directly to the internet without authentication — generation can consume significant GPU time and attract abuse. The same Liquid Web server that runs ComfyUI can also host vLLM for text generation if you need both modalities.
Model Management
| Type | Directory | Source |
|---|---|---|
| Checkpoints | models/checkpoints/ | HuggingFace, CivitAI |
| LoRAs | models/loras/ | CivitAI |
| VAE | models/vae/ | Often bundled with checkpoint |
| ControlNet | models/controlnet/ | HuggingFace |
Download from HuggingFace:
cd ComfyUI/models/checkpoints
wget https://huggingface.co/.../model.safetensors
ComfyUI Manager can download from CivitAI and HuggingFace via the UI. Keep checkpoints organized by use case: one folder for SDXL base models, another for FLUX, and separate LoRAs for styles (portrait, landscape, anime). This speeds up workflow switching when you automate with n8n.
ComfyUI vs AUTOMATIC1111 vs InvokeAI
| Feature | ComfyUI | AUTOMATIC1111 | InvokeAI |
|---|---|---|---|
| Interface | Node-based graph | Form-based | Form + canvas |
| Workflow flexibility | High (custom pipelines) | Low | Medium |
| Learning curve | Steep | Gentle | Medium |
| API mode | Yes (/prompt endpoint) | Limited | Yes |
| FLUX support | Yes | Partial | Yes |
| Production automation | Best | Limited | Good |
Choose ComfyUI when you need reproducible workflows, API-driven generation, or complex multi-step pipelines. The same Liquid Web GPU server can run vLLM for LLMs (see Serve LLaMA 3 with vLLM) and ComfyUI for images. To automate generation, connect ComfyUI with n8n; for custom models, fine-tune LLaMA 3 with QLoRA before serving.
FLUX produces higher quality but needs 24GB VRAM. If you have a 12GB GPU, start with SDXL. Once you're comfortable with nodes, add FLUX when you upgrade. Liquid Web offers both 12GB and 24GB+ options.
SDXL: 12GB VRAM minimum (RTX 3060 12GB, 4060 Ti 16GB). FLUX: 24GB recommended (RTX 4090, A100 40GB). For batch generation, more VRAM helps.
SSH tunnel: ssh -L 8188:localhost:8188 user@server. Then open http://localhost:8188. For production, use a reverse proxy (Nginx/Caddy) with HTTPS and optionally auth.
Yes. Run headless on a server. Use --listen for network access. No X11 or display needed.
In ComfyUI/models/checkpoints/. Download flux1-dev.safetensors or similar from HuggingFace. ComfyUI Manager can also fetch models.
ComfyUI: node-based, more powerful, API-friendly, steeper curve. AUTOMATIC1111: simpler, form-based, easier for beginners. ComfyUI is better for automation and production pipelines.




