Repository navigation
feat(generation): restore hosted-provider options, Canvas modes and model record editing - #9811
Open
joshistoast wants to merge 4 commits into
Open
joshistoast wants to merge 4 commits into
joshistoast wants to merge 4 commits into
Conversation
…record editing Add OpenAI/Gemini/Seedream options and provider named sizes to the Generate panel, compile them into the provider node and metadata, and recall them from images. Let external models generate from the Canvas in the modes they advertise (txt2img, img2img, inpaint) and reject outpaint with a named reason. Add an External Provider editor to the model detail for provider ids, modes, support flags, limits, and defaults; extend the mock backend with external fixtures and model PATCH.
… consistent Starter overlays fill only the capability, default-settings, and panel-schema fields a record never set, so saved external model edits persist through responses and generation; the router and service share one helper. Canvas asks a provider for the bounding box itself and hides render size and denoising strength for it; control layers and regional guidance are rejected by name. A named provider size is sent only when the current dimensions match its preset; the provider id is a select over the registered providers, falling back to text while the list is unavailable.
…of overriding the catalog The backend keeps overlaying the starter catalog, so starter records save only their provider ids and show capabilities, limits and defaults read-only; custom records keep the full editor. Unit tests follow the pixel-exact external grid and the mode-specific canvas rejection.
Request counts and chunk sets are unchanged; the provider core joins the editor's generation sources and the provider sections join the Generate widget's.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Hosted image providers (OpenAI, Gemini, Seedream and the other external generators) lost several legacy capabilities in webv2.
Provider options and named sizes. Generate offers the options each provider's node accepts (OpenAI quality, background and input fidelity; Gemini temperature and thinking level; Seedream watermark and optimize-prompt) only for models whose provider and capabilities support them, plus the provider's named image sizes and preset resolutions. They compile into the external invocation with the node's own field names, are recorded in metadata and restored by Recall All and Remix. A named size is sent only while it still matches the current width and height, so a hand-typed size is sent as is.
Canvas. External models can now generate from Canvas in the modes they advertise: text-to-image, image-to-image with the composited frame as the init image, and inpaint with the composited mask, sized to the bounding box. Outpaint, unadvertised modes, control layers and regional guidance are rejected with named reasons; the render-size slot and strength control are hidden for providers because the provider renders the whole frame.
Model record editor. External models gain an editor for the provider (a select over the configured providers), provider model id, supported modes, seed and reference support, image and reference limits, and default width/height/image count, saved through the model-records update contract with untouched capability tables preserved. The backend overlays the starter catalog's capabilities and defaults onto every model installed from it, so for those models the editor shows capabilities, limits and defaults read-only with a notice and saves only the provider ids, which do persist. Models added outside the starter catalog get the full editor.
Related Issues / Discussions
Follows up the legacy parity audit behind #9803.
QA Instructions
From
invokeai/frontend/webv2(Node 22.14, pnpm 10.12):pnpm check:releasepasses. No Python changes.Mock backend (representative profile; three fixture models are external):
Review
Material findings resolved: the Canvas size badge disagreed with what external models received (now the bounding box, with the render-size slot hidden); starter-catalog models appeared to save capability edits that the backend's catalog overlay then reverted (those fields are now read-only for starter models; an attempted backend change was dropped because install-time copies of the catalog would have stopped receiving catalog updates); a vacuous provider-options browser assertion; a hand-typed size still submitting the previous named size. Also applied: validation reasons for control layers and regional guidance, a provider select instead of free text, fixtures aligned with provider capabilities.
Limitations: no real provider execution was performed; OpenAI input fidelity is offered only when the model takes image inputs (the backend uses it only on the edits endpoint); if the starter catalog cannot be loaded the editor falls back to the full form, where capability edits to a starter model would be reverted by the backend overlay (reopening the section retries the load).
Compatibility / Rollout
New generate settings are optional with defaults and normalize on load; no project-document migration. No backend or API changes.
Checklist
What's Newcopy (if doing a release after this PR)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.