For ComfyUI
ComfyUI on Edge, your workflows on your servers
CPU mode today, at minutes per image. GPU instances are coming soon.
Why ComfyUI on Edge
The most flexible diffusion runtime, on infrastructure you own
Any workflow, as a graph
Checkpoints, LoRAs, ControlNets, upscalers and custom samplers wired together visually, then saved as JSON.CPU mode for builds and batches
--cpu runs workflows without a GPU. SD 1.5 at 512 px takes minutes per image: fine for prototyping and overnight jobs.Models in Edge Storage
Keep checkpoints, LoRAs and VAEs in a bucket and sync them into models/. Every VM starts from the same set.A headless API
POST workflow JSON to /prompt, get a prompt_id back, then poll /history or listen on the WebSocket.Outputs on the CDN
Upload finished images to a bucket and serve them through the CDN, resized and converted to WebP or AVIF on request.Custom nodes welcome
Install community nodes with git clone into custom_nodes/, or use ComfyUI-Manager. It's your VM.
Reference architecture
How ComfyUI maps to Edge
Your app
POST /prompt, poll /history
Artists
graph editor in the browser
comfy.acme.com
TLS, basic auth at the origin
python main.py --cpu
ComfyUI :8188 · s-8vcpu-16gb
comfy-models
checkpoints, LoRAs, VAEs
comfy-outputs
finished PNGs by prompt_id
img.acme.com
?width=768&format=auto
- Compute
Runs ComfyUI in CPU mode on 8 vCPU and 16 GiB, behind Nginx basic auth.
- GPU Compute
Coming soon. GPU instances for SDXL, FLUX and video models; join the waitlist.
- Storage
Two buckets: shared model files, and the images your workflows produce.
- CDN
TLS for the editor and API, plus worldwide delivery of finished images.
- Image optimisation
Resizes and converts outputs on request, so one PNG serves every size.
- DNS
Anycast DNS for comfy.acme.com and img.acme.com.
Deploy
ComfyUI on CPU in five steps
- 01
Write a bootstrap script
Installs ComfyUI with CPU-only PyTorch wheels, Nginx for auth, and the Edge CLI for model syncs.
comfy-setup.sh#!/bin/bash set -e apt-get update apt-get install -y python3-venv git nginx apache2-utils curl -fsSL https://edge.network/install.sh | sh git clone https://github.com/comfyanonymous/ComfyUI /opt/comfy cd /opt/comfy && python3 -m venv .venv && . .venv/bin/activate pip install torch torchvision torchaudio \ --index-url https://download.pytorch.org/whl/cpu pip install -r requirements.txt - 02
Create the VM and the buckets
16 GiB of memory is the practical floor for diffusion on CPU. --disk 160 leaves room for a few checkpoints.
shell$ edge compute scripts create --name comfy-setup --file comfy-setup.sh $ edge compute create --name comfy --size s-8vcpu-16gb --disk 160 \ --image ubuntu-24 --region london --script comfy-setup $ edge storage create comfy-models $ edge storage create comfy-outputs - 03
Run it as a service
Models sync from the bucket before each start, so every VM has the same set. ComfyUI stays on localhost.
/etc/systemd/system/comfy.service[Service] WorkingDirectory=/opt/comfy EnvironmentFile=/etc/comfy.env # EDGE_API_KEY ExecStartPre=/usr/local/bin/edge storage sync \ comfy-models/ /opt/comfy/models/ ExecStart=/opt/comfy/.venv/bin/python main.py --cpu \ --listen 127.0.0.1 --port 8188 Restart=always [Install] WantedBy=multi-user.target - 04
Put basic auth in front
Create the password file with htpasswd. The WebSocket headers keep the editor's live progress working.
/etc/nginx/sites-enabled/comfyserver { listen 443 ssl; server_name comfy.acme.com; ssl_certificate /etc/ssl/origin.pem; # origin certificate ssl_certificate_key /etc/ssl/origin.key; auth_basic "ComfyUI"; auth_basic_user_file /etc/nginx/.htpasswd; location / { proxy_pass http://127.0.0.1:8188; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } } - 05
Add the CDN and queue a workflow
One domain for the editor and API, one serving outputs from the bucket with image transforms on.
shell$ edge cdn create --name comfy $ edge cdn domains add cdn-a1b2c3 \ --domain comfy.acme.com --origin https://<vm-ip> $ edge cdn domains add cdn-a1b2c3 --domain img.acme.com \ --origin-type storage --storage-bucket comfy-outputs --jit-image # payload.json = { "prompt": <workflow exported in API format> } $ curl -u artist:$PASS https://comfy.acme.com/prompt \ -H "Content-Type: application/json" -d @payload.json
Prefer to hand it off? Give the job to your AI agent or have our engineers do it.
What it costs
Your own image pipeline, at a fixed price
- No per-image charges from a hosted API
- Image resizing included with the CDN
- Models and outputs move with zero egress
- Billed hourly from a prepaid balance, with hard caps
Estimated monthly bill on Edge
Workflow development and overnight batches · SD 1.5 on CPU
- Compute · vCPU$23.368 vCPU × $0.004/hr × 730 hrs
- Compute · memory$29.9016 GiB × $0.00256/GiB-hr × 730 hrs
- Compute · disk$11.84160 GiB NVMe × $0.074/GiB-mo
- Storage$0.6045 GB of models and outputs, first 5 GB free
- CDN$0.00~300k image requests, inside the 500k free tier
- DNS$0.00Zone, editor and image subdomains
- Egress$0.00
FAQ
ComfyUI on Edge, answered
Can ComfyUI run without a GPU?
When will GPU instances be available?
How do I call it from my app?
How do I secure it?
What about safety filters?
How do I share models between VMs?
Drop-in services
Add these without touching the stack
- Edge ShieldBot protection
POST /siteverify → score: 94Score prompt submissions from your public app before they're queued, so bots can't flood the VM with jobs.
Free for most sites. No puzzles, no widget to style.Explore - Edge AssistAI answers
<script src="…/assist.js">Give your users answers about your image product from your own docs, with one script tag.
Free tier: 250 answered questions a monthExplore
Generate images on your terms
Build your workflows on a CPU VM today, and join the GPU waitlist for production volume.
Free tiers hard-cap. Nothing bills until you add a card.