انتقل إلى المحتوى
VPS والخوادم · 8 دقيقة

ComfyUI server for Stable Diffusion and FLUX on a GPU

A ComfyUI server on a dedicated GPU machine runs Stable Diffusion and FLUX with no queue and no per-image fees: install the NVIDIA driver, put ComfyUI into a Python venv, and open the interface through an SSH tunnel instead of exposing it to the internet. With 96 GB of VRAM, FLUX.1 [dev] at full precision fits with plenty of room to spare.

What you need

All three GPU servers carry the same card, NVIDIA RTX PRO 6000 Blackwell Max-Q, 96 GB GDDR7. They differ in what is around it:

  • DS-G1 (Intel Core Ultra 7 265, 128 GB RAM, 2 × 1.92 TB NVMe, RAID 1) is enough for ComfyUI for one person or a small team. From $1550/month.
  • DS-G2 (512 GB RAM) when the same machine also runs other jobs, such as an LLM next to the image pipeline.
  • DS-G3 (4 × 3.84 TB NVMe, RAID 1) for a large library of checkpoints and LoRAs, or for training them.

The server comes with a clean Ubuntu 24.04 or Debian 12. Secure it first, as in the VPS security checklist: the same steps apply.

1. NVIDIA driver and the check

Blackwell cards need a recent driver with the open kernel modules. The NVIDIA repository provides it for both systems:

# ubuntu2404 or debian12
DISTRO=ubuntu2404
apt update && apt install -y wget linux-headers-$(uname -r)
wget https://developer.download.nvidia.com/compute/cuda/repos/$DISTRO/x86_64/cuda-keyring_1.1-1_all.deb
dpkg -i cuda-keyring_1.1-1_all.deb
apt update && apt install -y nvidia-open
reboot

After the reboot:

nvidia-smi

You should see the card with about 96 GB of memory. The "CUDA Version" there is the maximum the driver supports. You don't need to install the CUDA Toolkit: PyTorch brings its own CUDA libraries.

2. Install ComfyUI in a venv

Run it as a separate user, not as root:

apt install -y git python3-venv python3-dev
adduser comfy
su - comfy
git clone https://github.com/Comfy-Org/ComfyUI.git
cd ComfyUI
python3 -m venv venv && . venv/bin/activate
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
pip install -r requirements.txt
python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"

The last line should print True and the card's name. Blackwell needs PyTorch built for CUDA 12.8 or newer, hence cu128.

3. Models and where they go

Models live in ~/ComfyUI/models/: SD 1.5 and SDXL checkpoints in checkpoints/, FLUX in diffusion_models/, text_encoders/ and vae/, LoRAs in loras/. FLUX.1 [dev] is gated: accept its license on Hugging Face and log in with a token first.

pip install -U huggingface_hub
hf auth login
hf download black-forest-labs/FLUX.1-dev flux1-dev.safetensors --local-dir models/diffusion_models
hf download black-forest-labs/FLUX.1-dev ae.safetensors --local-dir models/vae
hf download comfyanonymous/flux_text_encoders clip_l.safetensors t5xxl_fp16.safetensors --local-dir models/text_encoders

That is about 35 GB for FLUX alone, and an SDXL checkpoint adds around 7 GB. Note that the FLUX.1 [dev] weights have a non-commercial license, while FLUX.1 [schnell] is Apache 2.0. Models can always be downloaded again, but your workflows and generated images can't: back up user/ and output/, backups are your job.

4. Run it behind an SSH tunnel

ComfyUI has no login. Keep it on 127.0.0.1, which is the default, and run it as a service. Create /etc/systemd/system/comfyui.service as root:

[Unit]
Description=ComfyUI
After=network-online.target

[Service]
User=comfy
WorkingDirectory=/home/comfy/ComfyUI
ExecStart=/home/comfy/ComfyUI/venv/bin/python main.py --listen 127.0.0.1 --port 8188
Restart=on-failure

[Install]
WantedBy=multi-user.target
systemctl daemon-reload && systemctl enable --now comfyui

On your computer, open the tunnel and go to http://localhost:8188 in a browser:

ssh -N -L 8188:127.0.0.1:8188 deploy@203.0.113.10

Details on keys and SSH clients are in connecting over SSH.

Troubleshooting

  • nvidia-smi can't talk to the driver. The proprietary modules were installed instead of the open ones, or there was no reboot. Install nvidia-open and reboot.
  • torch.cuda.is_available() is False, or "no kernel image is available". A CPU or older CUDA build of PyTorch got in. Reinstall it with the cu128 index.
  • The port is visible from outside. ss -tlnp | grep 8188 must show 127.0.0.1:8188, not 0.0.0.0.
  • Custom nodes. They are Python code with full access to the server. Install only what you trust.

GPU servers are assembled to order and ready 1–3 business days after prepayment. Planning to run LLMs on the same card? See what fits in 96 GB.

Order DS-G1

ComfyUI server for Stable Diffusion and FLUX on a GPU · dedisrv