A ComfyUI server setup on Ubuntu 24.04 takes four documented steps: clone the repository, install the CUDA 13.0 build of PyTorch, install the requirements and run python main.py, which serves the interface on 127.0.0.1:8188. FLUX.1 [dev] and FLUX.1 [schnell] are each a 23.8 GB file, so on a 24 GB card they run in the fp8 mode ComfyUI documents, while a 96 GB card holds the full-precision model, its 9.79 GB text encoder and a video model with room to spare. This guide covers the install, the model files and licences, what fits each MassiveGRID GPU dedicated server, and how to reach the interface without publishing an open port.
It assumes a clean Ubuntu 24.04 LTS server with root SSH access and the NVIDIA driver already working. If nvidia-smi does not print your card yet, follow the first-hour guide to drivers, CUDA and Docker first and come back.
What do you need before installing ComfyUI?
- A working driver.
nvidia-smimust list the RTX PRO 4000 Blackwell SFF (24 GB) or RTX PRO 6000 Blackwell Max-Q (96 GB). NVIDIA's Linux driver 620.70.06 lists both cards as supported (checked on 16 November 2026). - Python and git. ComfyUI's README says "Python 3.13 is very well supported" and names 3.12 as the fallback if a custom node has trouble. Check what the server has with
python3 --version. - Disk space for models. One FLUX.1 model with its text encoders and VAE is about 34 GB of files (the arithmetic is in the model table below). The RTX PRO 4000 server has 2x 512 GB NVMe and the RTX PRO 6000 server 2x 1.92 TB NVMe, so plan which models you keep on the smaller machine.
- A Hugging Face account for the gated repositories. FLUX.1 [dev], FLUX.1 [schnell] and Stable Diffusion 3.5 Large all ask you to accept their terms on the model page before the files download.
How do you install ComfyUI on Ubuntu with an NVIDIA GPU?
These are the manual-install steps from the ComfyUI README, as read on 16 November 2026. The only additions are a dedicated user and a Python virtual environment, which keep ComfyUI and its custom nodes away from the system Python and from root.
1. Create a user and a virtual environment.
apt update && apt install -y git python3-venv
adduser --disabled-password --gecos "" comfy
su - comfy
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
python3 -m venv venv
source venv/bin/activate
2. Install PyTorch for NVIDIA. The README states that "using a cu130 or above version of pytorch is required on Nvidia 20 series and above" and gives this command:
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130
Verify before going further. This must print True and the name of your card:
python -c "import torch; print(torch.cuda.is_available(), torch.cuda.get_device_name(0))"
3. Install the dependencies.
pip install -r requirements.txt
4. Start it.
python main.py
ComfyUI listens on 127.0.0.1 port 8188 by default. From a second SSH session, curl -I http://127.0.0.1:8188 should return an HTTP 200. Stop it with Ctrl+C once that works; the service section below starts it properly.
If the start fails with "Torch not compiled with CUDA enabled", the README's fix is pip uninstall torch followed by the install command from step 2 again.
Which model files do you download, and where do they go?
ComfyUI does not download models on its own: the README says the core "does not download anything unless you request it". Small single-file checkpoints go in models/checkpoints. The larger models are split into several files, and each has its own folder. Sizes are the file sizes on Hugging Face on 16 November 2026.
| Model | Main file | Size | Folder (per the ComfyUI examples) |
|---|---|---|---|
| FLUX.1 [dev] | flux1-dev.safetensors | 23.8 GB | models/diffusion_models/ |
| FLUX.1 [schnell] | flux1-schnell.safetensors | 23.8 GB | models/unet/ |
| FLUX text encoders | t5xxl_fp16.safetensors and clip_l.safetensors | 9.79 GB and 0.25 GB | models/text_encoders/ |
| FLUX text encoder, smaller | t5xxl_fp8_e4m3fn_scaled.safetensors | 5.16 GB | models/text_encoders/ |
| FLUX VAE | ae.safetensors | 335 MB | models/vae/ |
| Stable Diffusion 3.5 Large | sd3.5_large.safetensors | 16.5 GB | see the SD 3.5 workflow template |
| SDXL base 1.0 | sd_xl_base_1.0.safetensors | 6.94 GB | models/checkpoints/ |
A full-precision FLUX.1 [dev] set is therefore 23.8 + 9.79 + 0.25 + 0.34 = about 34.2 GB on disk. SDXL is an open repository, so a plain download works:
cd ~/ComfyUI/models/checkpoints
wget https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors
For the gated repositories, accept the terms on the model page, create a read token in your Hugging Face settings and pass it as a header:
cd ~/ComfyUI/models/diffusion_models
wget --header="Authorization: Bearer YOUR_HF_TOKEN" \
https://huggingface.co/black-forest-labs/FLUX.1-dev/resolve/main/flux1-dev.safetensors
Verify with ls -lh that the file size matches the table: an HTML error page saved under a .safetensors name is the usual cause of a model that refuses to load. Then load a FLUX workflow by dragging one of the example images from the ComfyUI examples page into the browser window; the workflow is embedded in the image.
Which models fit 24 GB and which need 96 GB?
Neither Black Forest Labs nor Stability AI prints a vRAM requirement on the model cards, so the honest method is arithmetic on file sizes plus what ComfyUI and the video model authors document. Measure your own workflow with nvidia-smi while it runs.
| Model | What the source says | RTX PRO 4000 server (24 GB, $449.99/mo) | RTX PRO 6000 server (96 GB, $1,656.15/mo) |
|---|---|---|---|
| SDXL base 1.0 | 6.94 GB checkpoint | Fits with room for batches | Fits many times over |
| SD 3.5 Large | 16.5 GB model, three text encoders | Fits the model; let ComfyUI offload the encoders | Everything stays loaded |
| FLUX.1 dev or schnell | 23.8 GB file; ComfyUI: setting weight_dtype to fp8 "will lower the memory usage by half" | Use fp8 weights or the single-file fp8 checkpoint | Full 16-bit weights plus the fp16 T5 encoder, about 34 GB of files |
| Wan 2.2 TI2V-5B (video) | Model card: "at least 24GB VRAM" for 720P at 24 FPS | At the stated minimum | Fits |
| Wan 2.2 T2V-A14B (video) | Model card: "at least 80GB VRAM", offload flags for less | Only with offloading | Fits |
| HunyuanVideo | Model card: peak 60 GB at 720x1280, 129 frames; 45 GB at 544x960; 80 GB recommended | Does not fit at the published settings | Fits |
Two caveats. The Wan and HunyuanVideo figures describe the authors' own reference scripts, and a ComfyUI workflow with quantised weights can behave differently. And ComfyUI's README lists Wan 2.1 and 2.2 and HunyuanVideo 1.5 among natively supported video models, so newer releases than the ones in this table exist; read the card of the exact version you download.
The short version: for SDXL, SD 3.5 and FLUX in fp8, 24 GB is enough and the smaller server costs $0.62 per hour of a 730-hour month. If you want FLUX at full precision with several LoRAs and a video model resident at the same time, or HunyuanVideo at all, that is a 96 GB job. The RTX PRO 4000 vs RTX PRO 6000 comparison covers the rest of the differences between the two cards.
How do you run ComfyUI as a service?
A systemd unit starts ComfyUI at boot and restarts it after a crash. As root, create /etc/systemd/system/comfyui.service:
[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
systemctl status comfyui
journalctl -u comfyui -f
Verify with curl -I http://127.0.0.1:8188 again, then reboot once and check that the service came back by itself. On the 4x RTX PRO 6000 server you can run one instance per card: ComfyUI has a --cuda-device argument that takes a device id, so four units with ids 0 to 3 and four different ports give four independent queues.
Why should --listen stay behind an SSH tunnel or a reverse proxy?
ComfyUI's argument file documents the behaviour precisely: --listen defaults to 127.0.0.1, and if you pass --listen without a value it binds 0.0.0.0 and ::, every IPv4 and IPv6 address on the machine. The same file documents TLS options (--tls-keyfile, --tls-certfile) but no username or password option. On a dedicated server with a public IPv4 address, a bare --listen therefore publishes an interface that can queue jobs, read outputs and install custom nodes to anyone who finds port 8188.
Option 1: an SSH tunnel. For one person or a small team with SSH keys this is the whole solution. Leave ComfyUI on 127.0.0.1 and run this on your own computer:
ssh -N -L 8188:127.0.0.1:8188 root@YOUR_SERVER_IP
Then open http://127.0.0.1:8188 locally. Nothing new is exposed: the traffic rides inside SSH.
Option 2: an authenticated reverse proxy with TLS. For a team that should not need SSH, put Caddy in front. Caddy obtains a certificate automatically when the site address is a domain name whose DNS record points at the server and ports 80 and 443 are open. Install it with the commands from Caddy's documentation for Debian and Ubuntu, create a password hash with caddy hash-password, and write /etc/caddy/Caddyfile:
comfy.example.com {
basic_auth {
studio PASTE_THE_HASH_HERE
}
reverse_proxy 127.0.0.1:8188
}
systemctl reload caddy
curl -I https://comfy.example.com
The verification is the status code: without credentials the curl must return 401, and with -u studio:yourpassword it must return 200. Finally, close everything else. With ufw that is ufw allow OpenSSH, ufw allow 80,443/tcp and ufw enable; port 8188 is never opened to the internet in either option.
What do the model licences allow?
The licence travels with the weights, not with the server, and it decides whether you may sell what you build. These are the licence names on each model card on 16 November 2026. Read the full text before a commercial launch; a table is not legal advice.
| Model | Licence on the model card | What that means in practice |
|---|---|---|
| FLUX.1 [dev] | FLUX.1 [dev] Non-Commercial License | The card says outputs may be used commercially, but the model licence itself is non-commercial; offering the model as a paid service needs a licence from Black Forest Labs |
| FLUX.1 [schnell] | Apache-2.0 | Commercial use permitted; 1 to 4 steps per image |
| Stable Diffusion 3.5 Large | Stability Community License | "Free for research, non-commercial, and commercial use for organizations or individuals with less than $1M in total annual revenue"; above that an Enterprise licence |
| SDXL base 1.0 | CreativeML Open RAIL++-M | Permissive with use restrictions listed in the licence |
| Wan 2.2 | Apache 2.0 | Commercial use permitted |
| HunyuanVideo | tencent-hunyuan-community | Tencent's own community licence; read its territory and use terms |
| LTX-Video | LTX-Video Open Weights License | Lightricks' own licence, per model version |
If the plan is a paid image product, FLUX.1 [schnell] and Wan 2.2 are the two entries with a standard open-source licence.
What goes wrong, and when is a server the wrong choice?
- Out-of-memory on FLUX with 24 GB. Switch the "Load Diffusion Model" node to fp8, use the smaller T5 encoder file from the table, or use the single-file fp8 checkpoint. ComfyUI's examples page lists exactly these three remedies.
- A model does not appear in the node's list. It is in the wrong folder. Compare with the table above, then refresh the browser.
- The service runs but the browser shows nothing. You are opening the server's public address while ComfyUI listens on 127.0.0.1. That is the intended state: use the tunnel or the proxy.
- The disk fills up. Outputs and models share the NVMe drives. Move finished work off the server regularly. A dedicated server is a single machine, so RAID across the two drives and off-server copies of your workflows and LoRAs are your responsibility.
- A custom node breaks after an update. The README warns that commits outside the stable release tags "may be very unstable and break many custom nodes". Check out a release tag on a production server.
A monthly server is not always the right tool. One designer who makes a few hundred images a month does not need a server, and a hosted image service fits that use. For a team the arithmetic changes: Midjourney lists its Standard plan at $30, Pro at $60 and Mega at $120 a month (its pricing page, checked on 16 November 2026), so $449.99 equals 15 Standard, 8 Pro or 4 Mega seats. For a short project, paying by the hour costs less: RunPod Secure Cloud lists the RTX Pro 6000 96 GB at $2.69 per hour on demand (checked on 16 November 2026), so a 40-hour job costs about $108 there, and the break-even against the $1,656.15 server is about 616 hours a month. The dedicated server makes sense when the queue runs most of the day, when a team shares it, when inputs must not leave a machine you control, or when you serve images to customers and want a fixed bill with unlimited traffic on a 1 Gbps port. The Stable Diffusion and FLUX hosting page sizes the servers by workload, and the earlier Stable Diffusion on a GPU server guide covers the wider Stable Diffusion setup.
Frequently Asked Questions
Can FLUX.1 dev run on a 24 GB GPU in ComfyUI?
Yes, in reduced precision. The flux1-dev.safetensors file is 23.8 GB, which leaves no room for the text encoder on a 24 GB card at full precision, so ComfyUI's own examples recommend setting weight_dtype to fp8, which they say lowers memory use by half, or using the single-file fp8 checkpoint. A 96 GB card runs the full 16-bit weights.
Is it safe to start ComfyUI with --listen on a public server?
Not on its own. Passing --listen without an address binds every IPv4 and IPv6 interface, and ComfyUI's argument file documents no login option. Keep it on 127.0.0.1 and use an SSH tunnel, or put an authenticating TLS reverse proxy such as Caddy with basic_auth in front of it.
Which server do I need for AI video generation?
Wan 2.2 TI2V-5B states a 24 GB minimum, which the RTX PRO 4000 server meets exactly. Wan 2.2 T2V-A14B states at least 80 GB and HunyuanVideo reports a 60 GB peak at 720p with 80 GB recommended, so both belong on the 96 GB RTX PRO 6000 server at $1,656.15 per month.
Can I sell images made with FLUX.1 dev?
The model card says outputs may be used commercially, but the model is under the FLUX.1 [dev] Non-Commercial License, and running it as a paid service requires a licence from Black Forest Labs. FLUX.1 [schnell] is Apache-2.0. Read the licence text for your case.
A whole GPU for your ComfyUI queue
MassiveGRID GPU dedicated servers: RTX PRO 4000 Blackwell with 24 GB for $449.99 per month or RTX PRO 6000 Blackwell with 96 GB for $1,656.15 per month, bare metal with root access, a 1 Gbps port with unlimited traffic and one dedicated IPv4. One-time setup fee applies.
See Stable Diffusion and FLUX HostingFurther Reading
- ComfyUI README: manual install for Linux and NVIDIA, Python and PyTorch versions, TLS flags
- ComfyUI cli_args.py: --listen, --port, --cuda-device and TLS arguments
- ComfyUI examples: FLUX file locations, fp8 options and out-of-memory tips
- Hugging Face: FLUX.1 [dev] model card, licence and file sizes
- Hugging Face: FLUX.1 [schnell] model card (Apache-2.0)
- Hugging Face: Stable Diffusion 3.5 Large model card and Community License terms
- Hugging Face: Wan 2.2 T2V-A14B and TI2V-5B model cards (vRAM statements)
- Hugging Face: HunyuanVideo model card (peak GPU memory table)
- Midjourney pricing (plans per month)
- RunPod pricing (Secure Cloud rates, checked on 16 November 2026)