Repository navigation
feat(models): default component models per main model - #10263
Draft
Pfannkuchensack wants to merge 5 commits into
Draft
Pfannkuchensack wants to merge 5 commits into
Pfannkuchensack wants to merge 5 commits into
Conversation
ModelSelect takes a `relatedTo` anchor instead of using its own value, which never had linkable candidates. Generate, Video and Upscale component, LoRA, VAE and reference pickers anchor on the active main model; model default settings anchor on the edited model. Linked models rank first in their base group with an icon naming the anchor model.
Chakra hides icons from assistive technology, so the link icon's label never reached screen readers, and the tooltip is unreachable while focus stays in the search field. Put the label into the option's text as visually hidden content and assert the option's accessible name.
Main models store default components (encoders, component source, PiD decoder) next to the default VAE; switching to the model fills empty or incompatible slots, and Reset and Recall apply them. The Model Manager edits them per slot and offers the VAEs Generate accepts, including cross-base ones. Re-identify keeps the default VAE and components.
2 of 7 tasks
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
A main model could only store a default VAE. Its other components (T5/CLIP, Qwen3, Qwen3-VL, Mistral, a component source, a PiD decoder, …) had to be picked by hand after every switch. The default VAE itself was applied only by Reset all to model defaults and by recall, never on switch.
MainModelDefaultSettings.components(optional map). Its keys are the component's generation metadata name (t5_encoder,qwen3_vl_encoder, …) and its values are model keys. Validation: snake_case keys,vaerejected (it keeps its own field), at most 16 entries, no blank values,{}→null. The field is left out of the stored JSON when unset. Re-identify now keeps the default VAE and components while the base is unchanged, and keeps the curated fields when the probe returns no settings.Related Issues / Discussions
Follow-up to #10246. Supersedes #10260 (FrankBro), which found the cross-base VAE picker gap.
QA Instructions
uv run --no-sync pytest tests/app/services/model_manager/test_model_record_changes.py tests/backend/model_manager/configs/test_main_default_components.py tests/backend/model_manager/configs/test_identified_default_settings.py tests/app/services/model_records/test_model_records_sql.py: 134 passed.openapi.jsonandschema.tsregenerated; they add only the new field. Ininvokeai/frontend/api:pnpm lintandpnpm testpass.pnpm run lint:codeandpnpm run architecture:checkpass.features/generation,features/models,appandworkbench/image-actions: 2 failures. All 7 are local de-DE number/keyboard formatting in untouched files (hotkeys, image-map, model cache,UpscaleCapabilityGate); CI runs en-US.components: {t5_encoder, clip_embed_model}and the section is clean afterwards.check:release, the performance gate, Family E2E. No graph builder changed; only which installed models the slots start with.Review
Resolved:
Remaining:
vaewas before.Compatibility / Rollout
componentsis rejected by an older server (extra="forbid"onMainModelDefaultSettings) and drops out of its model list until the components are cleared. Records without components are unaffected.default_settingsstill replaces the whole object, and the UI sends the full object.Checklist
What's Newcopy (if doing a release after this PR)Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.