Repository navigation
fix(images): a local A1111 edit reports the checkpoint the server rendered with - #279
Conversation
…dered with With no model named, an edit leaves the server on the checkpoint it has loaded, and the result named the first checkpoint the server lists, which need not be the loaded one. The result now takes the name from the response's own `info` (`sd_model_name`), and falls back to the listed one when the response carries none. A model the call names is reported as named.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideThe local Stable Diffusion provider now derives the reported model from A1111’s Sequence diagram for reported A1111 checkpoint selectionsequenceDiagram
participant Caller
participant StableDiffusionLocalProvider
participant A1111
Caller->>StableDiffusionLocalProvider: image operation
StableDiffusionLocalProvider->>A1111: POST /sdapi/v1/img2img or /sdapi/v1/extra-single-image
A1111-->>StableDiffusionLocalProvider: response with info
alt request.modelId is specified
StableDiffusionLocalProvider->>StableDiffusionLocalProvider: use request.modelId
else response info contains sd_model_name
StableDiffusionLocalProvider->>StableDiffusionLocalProvider: renderedCheckpoint(data.info)
else no rendered checkpoint
StableDiffusionLocalProvider->>StableDiffusionLocalProvider: use defaultModelId or unknown
end
StableDiffusionLocalProvider-->>Caller: result with modelId and usage
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 5 minutes for your next included review. View limit details
Comment |
PR Summary by QodoReport the checkpoint used by local A1111 image renders
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1.
|
…1 generation path is tested The usage record and the span of generateImage named the provider and model resolved before the request. A fallback provider that served the image after the first one failed, and a local server's own checkpoint, were recorded under the first choice. Both now come from the result, as editImage's already did. The provider-level tests cover the generation path of the checkpoint report: the name the response gives when the request names no model, the named model when it names one, and the first listed checkpoint when the response names none.
## [0.13.40](v0.13.39...v0.13.40) (2026-10-11) ### feat * **auth:** OAuth for a web server: a redirect flow, sealed secrets and a sealed token store (#242) ([59a20d1](59a20d1)) * **voice-pipeline:** build a speech-to-text chain from provider entries (#176) ([29046f2](29046f2)) ### fix * **images:** a local A1111 edit reports the checkpoint the server rendered with (#279) ([3744044](3744044)) * **images:** the untrusted image fetch closes six gaps a security review found (#278) ([b99ecbc](b99ecbc)) * **memory:** the guarded fetch's deadline covers decoding, and a network refusal names no resolver detail (#280) ([7d8bc9e](7d8bc9e)) ### docs * eleventh round of audit follow-ups (two pages published, the agent() and gmi() guides aligned) (#264) ([d4d3c6d](d4d3c6d))
What this fixes
A finding of a code review of #261.
An edit on a local Stable Diffusion server (AUTOMATIC1111) that names no model sends no checkpoint override, so the server renders with the checkpoint it has loaded. The result's
model, and with it the span and the usage record, nameddefaultModelId, which initialization takes from the first entry of/sdapi/v1/sd-models. On a server with several checkpoints the first one listed need not be the loaded one.The server says what it used: the response's
infois a JSON string withsd_model_name(Processed.js, returned by/sdapi/v1/txt2imgand/sdapi/v1/img2img). The result now reads the name from there, and falls back to the listed checkpoint when the response carries none. A model the call names is reported as named, as before.Test
image-operation-default-models.e2e: a server that lists two checkpoints and answers withsd_model_nameof the second; the edit reports the second.Summary by Sourcery
Report the model actually used for local image generation and keep related usage and tracing metadata accurate.
Bug Fixes:
Enhancements:
Tests: