{
  "@context": "https://schema.org",
  "@type": "WebPage",
  "name": "Self-host ComfyUI on Edge | Stable Diffusion workflows",
  "headline": "Self-host ComfyUI on Edge | Stable Diffusion workflows",
  "description": "Run ComfyUI on Edge CPU VMs for workflow building and batch jobs, with checkpoints in storage and outputs served by the CDN. GPU instances are coming soon.",
  "url": "https://edge.network/solutions/comfyui",
  "image": "https://edge.network/og/solutions__comfyui.png",
  "inLanguage": "en",
  "publisher": {
    "@type": "Organization",
    "name": "Edge Network",
    "url": "https://edge.network",
    "logo": "https://edge.network/favicon.svg"
  },
  "isPartOf": {
    "@type": "WebSite",
    "name": "Edge Network",
    "url": "https://edge.network"
  },
  "breadcrumb": {
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://edge.network"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Solutions",
        "item": "https://edge.network/solutions"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Comfyui",
        "item": "https://edge.network/solutions/comfyui"
      }
    ]
  },
  "section": "solutions",
  "articleBody": "For ComfyUI\n\n ComfyUI on Edge, your workflows on your servers\n\n Build and run node-based diffusion workflows on a CPU VM, with checkpoints in your bucket and finished images served from the CDN. Slow on CPU, but private, scriptable and ready to move to GPU instances when they land. Deploy a VM See AI infrastructure CPU mode today, at minutes per image. GPU instances are coming soon.\n\n Why ComfyUI on Edge\n\n The most flexible diffusion runtime, on infrastructure you own \n\n ComfyUI turns image generation into graphs you can save, version and call over HTTP. On Edge today it runs in CPU mode, suited to building workflows and running batches overnight. GPU instances are coming soon Diffusion models are GPU workloads, and Edge GPU instances aren&#x27;t available yet. On CPU, ComfyUI is practical for building workflows, SD 1.5-class models and overnight batches, not for interactive SDXL or FLUX. Join the waitlist to move to GPU when it launches. Join the GPU waitlist \n\n Any workflow, as a graph\n\n Checkpoints, LoRAs, ControlNets, upscalers and custom samplers wired together visually, then saved as JSON. \n CPU mode for builds and batches\n\n --cpu runs workflows without a GPU. SD 1.5 at 512 px takes minutes per image: fine for prototyping and overnight jobs. \n Models in Edge Storage\n\n Keep checkpoints, LoRAs and VAEs in a bucket and sync them into models/. Every VM starts from the same set. \n A headless API\n\n POST workflow JSON to /prompt, get a prompt_id back, then poll /history or listen on the WebSocket. \n Outputs on the CDN\n\n Upload finished images to a bucket and serve them through the CDN, resized and converted to WebP or AVIF on request. \n Custom nodes welcome\n\n Install community nodes with git clone into custom_nodes/, or use ComfyUI-Manager. It&#x27;s your VM. \n Reference architecture\n\n Headless ComfyUI between two buckets \n\n ComfyUI runs headless on a VM behind Nginx basic auth. Models sync from one bucket, outputs go to another, and the CDN serves finished images at any size. External Your app\n\n POST /prompt, poll /history\n\n Visitors Artists\n\n graph editor in the browser\n\n HTTPS + WSS Edge CDN comfy.acme.com\n\n TLS, basic auth at the origin\n\n proxied Edge Compute python main.py --cpu\n\n ComfyUI :8188, s-8vcpu-16gb\n\n SD 1.5 LoRA S3 API Edge Storage comfy-models\n\n checkpoints, LoRAs, VAEs\n\n Edge Storage comfy-outputs\n\n finished PNGs by prompt_id\n\n storage origin Edge CDN img.acme.com\n\n ?width=768&format=auto\n\n WebP AVIF Compute Runs ComfyUI in CPU mode on 8 vCPU and 16 GiB, behind Nginx basic auth.\n\n GPU Compute Coming soon. GPU instances for SDXL, FLUX and video models; join the waitlist.\n\n Storage Two buckets: shared model files, and the images your workflows produce.\n\n CDN TLS for the editor and API, plus worldwide delivery of finished images.\n\n Image optimisation Resizes and converts outputs on request, so one PNG serves every size.\n\n DNS Anycast DNS for comfy.acme.com and img.acme.com.\n\n Deploy\n\n ComfyUI on CPU in five steps \n\n A CPU build of PyTorch, models from your bucket, and a proxy with authentication in front. ComfyUI has none of its own. ~/comfy $ edge compute create --name comfy \\ \n\n --size s-8vcpu-16gb --disk 160 \\\n\n --image ubuntu-24 --region london \\\n\n --script comfy-setup\n\n ✓ vm-6b02e9 running, 64.34.86.90\n\n $ edge storage sync comfy-models/ models/ \n\n ✓ SD 1.5 checkpoint + 3 LoRAs synced\n\n $ python main.py --cpu --listen 127.0.0.1 \n\n ✓ Starting server, 127.0.0.1:8188\n\n ✓ Live at https://comfy.acme.com\n\n Per-image fees $0 comfy.acme.com Running Runtime ComfyUI, --cpu Checkpoint SD 1.5, 512 px 01 Write a bootstrap script\n\n Installs ComfyUI with CPU-only PyTorch wheels, Nginx for auth, and the Edge CLI for model syncs.\n\n comfy-setup.sh Copy #!/bin/bash\nset -e\napt-get update\napt-get install -y python3-venv git nginx apache2-utils\ncurl -fsSL https://edge.network/install.sh | sh\ngit clone https://github.com/comfyanonymous/ComfyUI /opt/comfy\ncd /opt/comfy && python3 -m venv .venv && . .venv/bin/activate\npip install torch torchvision torchaudio \\\n --index-url https://download.pytorch.org/whl/cpu\npip install -r requirements.txt \n 02 Create the VM and the buckets\n\n 16 GiB of memory is the practical floor for diffusion on CPU. --disk 160 leaves room for a few checkpoints.\n\n shell Copy $ edge compute scripts create --name comfy-setup --file comfy-setup.sh\n$ edge compute create --name comfy --size s-8vcpu-16gb --disk 160 \\\n --image ubuntu-24 --region london --script comfy-setup\n$ edge storage create comfy-models\n$ edge storage create comfy-outputs \n 03 Run it as a service\n\n Models sync from the bucket before each start, so every VM has the same set. ComfyUI stays on localhost.\n\n /etc/systemd/system/comfy.service Copy [Service]\nWorkingDirectory=/opt/comfy\nEnvironmentFile=/etc/comfy.env # EDGE_API_KEY\nExecStartPre=/usr/local/bin/edge storage sync \\\n comfy-models/ /opt/comfy/models/\nExecStart=/opt/comfy/.venv/bin/python main.py --cpu \\\n --listen 127.0.0.1 --port 8188\nRestart=always\n\n[Install]\nWantedBy=multi-user.target \n 04 Put basic auth in front\n\n Create the password file with htpasswd. The WebSocket headers keep the editor&#x27;s live progress working.\n\n /etc/nginx/sites-enabled/comfy Copy server {\n listen 443 ssl;\n server_name comfy.acme.com;\n ssl_certificate /etc/ssl/origin.pem; # origin certificate\n ssl_certificate_key /etc/ssl/origin.key;\n\n auth_basic \"ComfyUI\";\n auth_basic_user_file /etc/nginx/.htpasswd;\n\n location / {\n proxy_pass http://127.0.0.1:8188;\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection \"upgrade\";\n }\n} \n 05 Add the CDN and queue a workflow\n\n One domain for the editor and API, one serving outputs from the bucket with image transforms on.\n\n shell Copy $ edge cdn create --name comfy\n$ edge cdn domains add cdn-a1b2c3 \\\n --domain comfy.acme.com --origin https://<vm-ip>\n$ edge cdn domains add cdn-a1b2c3 --domain img.acme.com \\\n --origin-type storage --storage-bucket comfy-outputs --jit-image\n\n# payload.json = { \"prompt\": <workflow exported in API format> }\n$ curl -u artist:$PASS https://comfy.acme.com/prompt \\\n -H \"Content-Type: application/json\" -d @payload.json \n Prefer to hand it off? Give the job to your AI agent or have our engineers do it .\n\n What it costs\n\n Your own image pipeline, at a fixed price \n\n No GPU instance is priced here because none is available yet. This is an 8 vCPU VM from the published per-resource rates, plus storage and CDN delivery. No per-image charges from a hosted API \n Image resizing included with the CDN \n Models and outputs move with zero egress \n See compute pricing Estimated monthly bill on Edge\n\n Workflow development and overnight batches, SD 1.5 on CPU\n\n USD Compute (vCPU) $23.36 8 vCPU × $0.004/hr × 730 hrs \n Compute (memory) $29.90 16 GiB × $0.00256/GiB-hr × 730 hrs \n Compute (disk) $11.84 160 GiB NVMe × $0.074/GiB-mo \n Storage $0.60 45 GB of models and outputs, first 5 GB free \n CDN $0.00 ~300k image requests, inside the 500k free tier \n DNS $0.00 Zone, editor and image subdomains \n Egress $0.00 \n Total $65.70 FAQ\n\n Running ComfyUI before the GPUs land \n\n Something else? Ask an engineer . Can ComfyUI run without a GPU? Yes, with --cpu. SD 1.5-class models at 512 px take minutes per image on 8 vCPU. SDXL and FLUX run far slower, which rules them out for interactive use until GPU instances arrive. When will GPU instances be available? GPU instances are coming soon. Join the waitlist at /compute/gpus to hear first. If you need GPU capacity now, contact us: we may be able to arrange early access or an interim option. How do I call it from my app? Export a workflow in API format, POST it to /prompt and keep the prompt_id. Poll /history/<prompt_id> or listen on /ws for completion, then fetch the image with /view or pick it up from the outputs bucket. How do I secure it? ComfyUI has no built-in authentication, so never expose port 8188. Keep it on 127.0.0.1 and put Nginx basic auth, or your own SSO proxy, in front, as in step four. What about safety filter...",
  "headings": [
    {
      "level": 1,
      "text": "ComfyUI on Edge, your workflows on your servers"
    },
    {
      "level": 3,
      "text": "Any workflow, as a graph"
    },
    {
      "level": 3,
      "text": "CPU mode for builds and batches"
    },
    {
      "level": 3,
      "text": "Models in Edge Storage"
    },
    {
      "level": 3,
      "text": "A headless API"
    },
    {
      "level": 3,
      "text": "Outputs on the CDN"
    },
    {
      "level": 3,
      "text": "Custom nodes welcome"
    },
    {
      "level": 3,
      "text": "Write a bootstrap script"
    },
    {
      "level": 3,
      "text": "Create the VM and the buckets"
    },
    {
      "level": 3,
      "text": "Run it as a service"
    },
    {
      "level": 3,
      "text": "Put basic auth in front"
    },
    {
      "level": 3,
      "text": "Add the CDN and queue a workflow"
    },
    {
      "level": 2,
      "text": "Generate images on your terms"
    }
  ],
  "relatedLinks": [
    {
      "@type": "WebPage",
      "name": "Network",
      "url": "https://edge.network/network"
    },
    {
      "@type": "WebPage",
      "name": "Pricing",
      "url": "https://edge.network/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Docs",
      "url": "https://edge.network/docs"
    },
    {
      "@type": "WebPage",
      "name": "Sign in",
      "url": "https://edge.network/console/access"
    },
    {
      "@type": "WebPage",
      "name": "Solutions",
      "url": "https://edge.network/solutions"
    },
    {
      "@type": "WebPage",
      "name": "Stacks",
      "url": "https://edge.network/solutions/stacks"
    },
    {
      "@type": "WebPage",
      "name": "See AI infrastructure",
      "url": "https://edge.network/solutions/ai"
    },
    {
      "@type": "WebPage",
      "name": "Join the GPU waitlist",
      "url": "https://edge.network/compute/gpus"
    },
    {
      "@type": "WebPage",
      "name": "Compute",
      "url": "https://edge.network/compute"
    },
    {
      "@type": "WebPage",
      "name": "Storage",
      "url": "https://edge.network/storage"
    },
    {
      "@type": "WebPage",
      "name": "CDN",
      "url": "https://edge.network/cdn"
    },
    {
      "@type": "WebPage",
      "name": "Image optimisation",
      "url": "https://edge.network/docs/cdn/image-optimization"
    },
    {
      "@type": "WebPage",
      "name": "DNS",
      "url": "https://edge.network/dns"
    },
    {
      "@type": "WebPage",
      "name": "Give the job to your AI agent",
      "url": "https://edge.network/solutions/agentic-development"
    },
    {
      "@type": "WebPage",
      "name": "have our engineers do it",
      "url": "https://edge.network/solutions/expert-services"
    },
    {
      "@type": "WebPage",
      "name": "See compute pricing",
      "url": "https://edge.network/compute/pricing"
    },
    {
      "@type": "WebPage",
      "name": "Ask an engineer",
      "url": "https://edge.network/contact"
    },
    {
      "@type": "WebPage",
      "name": "Shield",
      "url": "https://edge.network/shield"
    },
    {
      "@type": "WebPage",
      "name": "Assist",
      "url": "https://edge.network/assist"
    },
    {
      "@type": "WebPage",
      "name": "Pulse",
      "url": "https://edge.network/pulse"
    },
    {
      "@type": "WebPage",
      "name": "Agent API &amp; MCP",
      "url": "https://edge.network/docs/agent"
    },
    {
      "@type": "WebPage",
      "name": "Academy",
      "url": "https://edge.network/academy"
    },
    {
      "@type": "WebPage",
      "name": "Case Studies",
      "url": "https://edge.network/case-studies"
    },
    {
      "@type": "WebPage",
      "name": "Releases",
      "url": "https://edge.network/releases"
    },
    {
      "@type": "WebPage",
      "name": "Roadmap",
      "url": "https://edge.network/roadmap"
    },
    {
      "@type": "WebPage",
      "name": "Status",
      "url": "https://edge.network/status"
    },
    {
      "@type": "WebPage",
      "name": "About",
      "url": "https://edge.network/about"
    },
    {
      "@type": "WebPage",
      "name": "Environment",
      "url": "https://edge.network/environment"
    },
    {
      "@type": "WebPage",
      "name": "Latest",
      "url": "https://edge.network/latest"
    },
    {
      "@type": "WebPage",
      "name": "Blog",
      "url": "https://edge.network/blog"
    }
  ],
  "alternateFormats": [
    {
      "@type": "MediaObject",
      "contentType": "text/html",
      "url": "https://edge.network/solutions/comfyui",
      "name": "HTML version"
    }
  ],
  "dateModified": "2026-11-23T02:00:49.377Z"
}