How to Self-Host Stable Diffusion with WordPress
If you want AI image generation on your WordPress site with no per-generation fees, full privacy, and complete control over which models run, the answer is to self-host. StudioUI Pro is the front end that makes that practical: you run Stable Diffusion (or FLUX, or SDXL-class models) on your own GPU through ComfyUI, and StudioUI puts a clean studio in front of it on your site. This guide is the architecture and the setup.
How self-hosting fits together
There are three pieces. ComfyUI is the engine that actually runs the models on your GPU. Your Stable Diffusion checkpoints (and any LoRAs, custom nodes or VAEs) live inside ComfyUI. StudioUI Pro is the WordPress front end that sends jobs to ComfyUI and writes the results back to your media library. The hosted gateway isn’t involved at all — generation never leaves your infrastructure.
Prerequisites
- A GPU machine capable of running Stable Diffusion — this is the real requirement; everything else is software.
- StudioUI Pro ($149/yr) — self-hosting is a Pro capability; the Free tier is hosted-only.
- ComfyUI installed on the GPU machine with the Stable Diffusion checkpoints you want already downloaded.
- A network route from your WordPress server to the GPU machine (LAN, VPN, or a tunnel/reverse proxy if the GPU is behind a home connection).
Step 1 — Get ComfyUI running with your models
Install ComfyUI on the GPU box and place your Stable Diffusion checkpoints in its models folder. Launch it so it listens on an address your WordPress host can reach — ComfyUI’s default port is 8188, and you’ll want to start it with --listen so it accepts connections beyond 127.0.0.1. Confirm the graph loads at http://YOUR-GPU-HOST:8188 from the WordPress network.
Step 2 — Activate StudioUI Pro
Install StudioUI and activate your Pro licence. Pro unlocks the self-host backend settings that the Free tier doesn’t expose.
Step 3 — Point StudioUI at ComfyUI
In StudioUI’s settings, switch the image backend to self-hosted ComfyUI and enter your endpoint, e.g. http://YOUR-GPU-HOST:8188. Save. From now on, image jobs route to your GPU instead of hosted compute, and there are no per-generation credit charges.
Step 4 — Match the models the workflow expects
StudioUI sends jobs that expect certain checkpoints and nodes to exist in ComfyUI. Make sure the Stable Diffusion model and any custom nodes your workflow needs are installed — a missing checkpoint or node is the single most common cause of a self-hosted failure. Keep model names consistent with what StudioUI requests.
Step 5 — Test the real path
Open the studio page and generate one image while watching the ComfyUI console. You should see the job arrive and execute, and the finished image should land in your WordPress media library. Always test the live generate path, not just that the settings saved.
Troubleshooting
- Job never reaches ComfyUI — a firewall or a localhost-only bind. Verify the WordPress server (not your laptop) can hit the endpoint.
- Job arrives but errors — a missing checkpoint, LoRA or custom node. The ComfyUI console names what’s absent.
- Works on LAN, fails live — the GPU is on a private network the production server can’t see. Use a tunnel, reverse proxy or VPN.
- Heavy jobs time out — large renders can exceed default timeouts; start with lighter workflows while you validate.
FAQ
Do I need Pro to self-host Stable Diffusion?
Yes. Self-hosting via your own ComfyUI backend is a Pro feature ($149/yr). The Free tier runs entirely on hosted compute and needs no GPU.
Are there per-generation fees when I self-host?
No. Once generation runs on your own GPU there are no per-image credit charges — you pay only your own hardware and electricity. That’s the main reason to self-host at volume.
Which models can I run?
Whatever ComfyUI supports and you’ve installed — Stable Diffusion checkpoints, SDXL-class models, FLUX, plus LoRAs and custom nodes. StudioUI is the interface; you control the model library.
Does anything leave my infrastructure?
When generation runs on your own ComfyUI, the generation stays on your hardware. Your Pro licence is validated separately, but the images themselves don’t go to a third party.
Can I mix self-hosted and hosted?
Pro lets you point different modalities at different backends and bring your own keys with failover, so you can self-host images while using hosted or BYO-key paths elsewhere.
Run Stable Diffusion on your own terms
Put StudioUI Pro in front of your ComfyUI GPU and your WordPress site becomes a private, fee-free Stable Diffusion studio — your models, your hardware, your brand.
Get Pro — $149/yr · Connect ComfyUI step-by-step · What is ComfyUI?
Related in guides & tutorials
- Add an AI Art Generator to WordPress | StudioUI
- AI Product Images in WordPress | StudioUI
- Build an AI Image Generator Site | StudioUI
- Build an AI SaaS with WordPress | StudioUI
- Create Blog Images with AI in WP | StudioUI
- Generate AI Thumbnails in WordPress | StudioUI
- How to Add AI Music to WordPress | StudioUI
- How to Add AI Video to WordPress | StudioUI