fix(llamaswap): use A1111 /sdapi/v1/txt2img so seed is honored
The OpenAI /v1/images/generations endpoint ignores `seed` on our stable-diffusion.cpp build — every render of a given prompt comes back byte-identical, so a drawbot batch of N collapsed to one image. Switch the image provider to sd-server's A1111 /sdapi/v1/txt2img endpoint, which honors `seed` (verified live: distinct seeds -> distinct images on SDXL and Qwen-Image). Size is split into width/height; llama-swap still routes by the `model` field. Tests + ADR-0016 updated.
This commit is contained in:
@@ -52,3 +52,12 @@ contract is unchanged for callers that don't set them. `provider/llamaswap`
|
||||
forwards them to sd-server as `steps`/`cfg_scale`/`negative_prompt`/`sample_method`/
|
||||
`seed` (omitempty). This realizes the "seeds/steps … additive fields" note above;
|
||||
img2img/masks/streaming remain deferred.
|
||||
|
||||
## Update — A1111 txt2img endpoint (seed support)
|
||||
|
||||
`provider/llamaswap` now POSTs to sd-server's **`/sdapi/v1/txt2img`** (A1111)
|
||||
instead of the OpenAI `/v1/images/generations`. That OpenAI endpoint **ignores
|
||||
`seed`** on the stable-diffusion.cpp build we run — every render of a prompt is
|
||||
byte-identical, so a batch of N collapses to one image. `/sdapi/v1/txt2img`
|
||||
honours `seed`, restoring real per-render variety. llama-swap still routes by
|
||||
the `model` field in the body; `Size` is split into `width`/`height`.
|
||||
|
||||
Reference in New Issue
Block a user