feat(imagegen): optional per-request generation settings
Add Steps, CFGScale, NegativePrompt, Sampler, Seed to imagegen.Request (pointer/empty = leave the backend's per-model default), with mirror options, and forward them in the llamaswap wire payload as the stable-diffusion.cpp fields (steps/cfg_scale/negative_prompt/ sample_method/seed). Unset fields are omitted so sd-server keeps its baked defaults. Lets callers (e.g. mort drawbots) override only what they explicitly set.
This commit is contained in:
@@ -42,3 +42,13 @@ asked for "a new ai image interface as opposed to llm".
|
||||
callers (additive fields/options).
|
||||
- No health/failover for image models yet; if needed it can be added as a
|
||||
separate chain type rather than retrofitting the chat chain.
|
||||
|
||||
## Update — optional per-request settings
|
||||
|
||||
`Request` gained additive optional overrides — `Steps *int`, `CFGScale *float64`,
|
||||
`NegativePrompt string`, `Sampler string`, `Seed *int64` — with mirror options
|
||||
(`WithSteps`, …). nil/"" means "leave the backend's per-model default", so the v1
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user