The dream: clone the repo, point at a local ComfyUI instance running on `http://localhost:8188\`, generate without ever paying a hosted provider.
What this looks like
- Add `"comfyui"` to the `ProviderId` union in `src/lib/slide-types.ts`.
- Implement `generateComfyImage(prompt, aspect, workflow)` in `src/lib/generate.core.ts`:
- POST a workflow JSON to `{COMFY_URL}/prompt`
- Poll `/history/{prompt_id}` until the queue clears
- Read the resulting image bytes from `/view?filename=...`
- Return a data URL (or a file:// URL we serve from a local proxy route)
- Add `COMFY_URL` (default `http://localhost:8188\`) to `.env.example`.
- Add "ComfyUI · local" to `PROVIDER_OPTIONS` with a small set of canonical workflow templates as `MODELS` (e.g. "SDXL Base", "SDXL + 4× upscale", "Flux Schnell").
- Ship one or two example `.json` workflows in `public/comfy-workflows/`.
Trickiness
- ComfyUI uses websockets for status; polling `/history` is the simpler path
- Workflow JSON varies per checkpoint — we should accept a workflow filename in `MODELS` and load it at request time
- CORS: ComfyUI by default doesn't allow cross-origin. Likely need a tiny proxy route in our app that forwards to `COMFY_URL` server-side
Why this matters
"No API keys, fully offline, your-GPU-your-rules" is the move that gets the Reddit / r/StableDiffusion / r/LocalLLaMA crowd. Big star magnet.
The dream: clone the repo, point at a local ComfyUI instance running on `http://localhost:8188\`, generate without ever paying a hosted provider.
What this looks like
Trickiness
Why this matters
"No API keys, fully offline, your-GPU-your-rules" is the move that gets the Reddit / r/StableDiffusion / r/LocalLLaMA crowd. Big star magnet.