Skip to content

fix(models): rebase relocated submodel paths - #9592

Open
wunianze666-netizen wants to merge 2 commits into
invoke-ai:mainfrom
wunianze666-netizen:fix/issue-9580-relocated-submodel-paths-main
Open

wunianze666-netizen wants to merge 2 commits into
invoke-ai:mainfrom
wunianze666-netizen:fix/issue-9580-relocated-submodel-paths-main

Conversation

@wunianze666-netizen

@wunianze666-netizen wunianze666-netizen commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix remote SDNQ pipeline installs retaining absolute submodel paths from the tmpinstall_* staging directory after the pipeline is moved into the managed models directory.
  • Rebase a recorded component onto the loader's resolved current model root only when the recorded path is missing and the same-named component exists under that root.
  • Preserve valid external component paths, arbitrary model_index.json component names, and the existing failure behavior when neither path exists.

The installer probes the downloaded pipeline before install_path() moves it. Identification records absolute paths for direct child components, while registration updates only the top-level model path and stores managed paths relative to the models directory. Later, the shared resolver therefore returns a deleted staging path, which Transformers interprets as a Hub repository identifier. The resolved loader fallback—not the persisted relative config.path—is the authoritative current root.

Related Issues / Discussions

Closes #9580

QA Instructions

The relocation regression fails before the final implementation when it models a managed record with relative config.path: the resolver returns the deleted staging path instead of the installed component. It passes after the resolver derives the absolute root from fallback.parent.

After the fix:

python -m pytest tests/backend/model_manager/load/test_load_default_helpers.py tests/backend/model_manager/configs/test_z_image_sdnq_identification.py tests/backend/model_manager/configs/test_sdnq_pipeline_submodel_discovery.py -o addopts= -p no:cov -q
63 passed

python -m ruff check invokeai/backend/model_manager/load/load_default.py tests/backend/model_manager/load/test_load_default_helpers.py
All checks passed!

python -m ruff format --check invokeai/backend/model_manager/load/load_default.py tests/backend/model_manager/load/test_load_default_helpers.py
2 files already formatted

git diff --check and the focused sensitive-path scan also pass. The pytest run emits one existing pytest-asyncio configuration warning unrelated to this change.

Merge Plan

No special merge plan is required; this is a focused loader-path fix with regression coverage.

Checklist

  • The PR has a short but descriptive title, suitable for a changelog
  • Tests added / updated (if applicable)
  • Changes to a redux slice have a corresponding migration (not applicable)
  • Documentation added / updated (if applicable) (not applicable; behavior is covered by tests)
  • Updated What's New copy (if doing a release after this PR) (not applicable)

AI-assisted tooling was used to trace the install lifecycle and develop the focused patch and tests; all listed checks were run against the submitted commit.

@github-actions github-actions Bot added python PRs that change python files backend PRs that change backend files python-tests PRs that change python tests labels Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend PRs that change backend files python PRs that change python files python-tests PRs that change python tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: repo_name error when using starter SDQN model

1 participant