Hands-on tutorials

Use ComfyUI on a remote GPU server

Prepare a ComfyUI environment, connect securely through SSH and build a first image workflow with a compatible checkpoint.

Examples for Linux and NVIDIA GPUs. Adapt paths and requirements to your instance. Commands are based on upstream documentation; they have not been benchmarked on every NOSGPU configuration.

1. Prepare an isolated environment

Use a Linux instance with an NVIDIA GPU, working drivers, Git and a Python version supported by the current ComfyUI release. Create the environment below. Before installing requirements, install the GPU build of PyTorch indicated by its official selector for your driver and platform. CPU-only PyTorch will not use the GPU.

nvidia-smi
git clone https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI
python3 -m venv .venv
source .venv/bin/activate

2. Check CUDA and start ComfyUI

After installing the appropriate PyTorch build, install the application dependencies. The CUDA check should print True. Start ComfyUI on localhost and keep the terminal running. On your own computer, open the tunnel in a separate terminal, replacing USER and SERVER_IP, then visit http://127.0.0.1:8188 in your browser.

python -m pip install -r requirements.txt
python -c "import torch; print(torch.cuda.is_available())"
python main.py --listen 127.0.0.1 --port 8188

On your computer, in a separate terminal

ssh -N -L 8188:127.0.0.1:8188 USER@SERVER_IP

3. Build a first image workflow

For a basic Stable Diffusion 1.5 workflow, obtain a compatible checkpoint with an appropriate licence and place it in models/checkpoints. Connect Checkpoint Loader, positive and negative CLIP Text Encode, Empty Latent Image, KSampler, VAE Decode and Save Image. Try 512 × 512, batch 1, 20 steps and a fixed seed. Newer model families may need different files and nodes.

4. Keep the workflow reproducible

Save the workflow JSON, seed and model version with your outputs. If memory runs out, reduce batch size or resolution before adding resources. Install custom nodes only from reviewed sources: they execute code on your server. Keep backups of outputs and workflows, and do not expose an unauthenticated ComfyUI interface directly to the internet.

Official documentation

Put your next idea to work.

Choose the resources for your workload, or talk to us about requirements before deploying.