Stable Diffusion on GPU VPS
Requires NVIDIA GPU VPS with 6+ GB VRAM for comfortable generation speeds.
Install AUTOMATIC1111
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
./webui.sh --api --listen --port 7860Python API
import requests, base64
payload = {"prompt": "professional server photo", "steps": 20, "width": 512, "height": 512}
r = requests.post("http://localhost:7860/sdapi/v1/txt2img", json=payload)
img = base64.b64decode(r.json()["images"][0])No GPU? Use RunPod.io (~$0.2/hour for RTX 4090) or Vast.ai.