Skip to content

feat(webui): allow multiple model package downloads, Fix #1075 - #1082

Merged
0xShug0 merged 3 commits into
0xShug0:mainfrom
ZeroDot1:ZeroDot1/model-library-download-queue
Oct 27, 2026
Merged

0xShug0 merged 3 commits into
0xShug0:mainfrom
ZeroDot1:ZeroDot1/model-library-download-queue

Conversation

@ZeroDot1

Copy link
Copy Markdown
Contributor

Allow users to start downloads for multiple package variants in one model family from the Model Library. Keep download controls available for sibling packages while preventing duplicate requests for the same package. Preserve update and removal guards while any package in the family is active.

Serialize package installation transactions that share a target directory. Variants can share sidecar files, so concurrent publication into the same directory could otherwise race. Packages with different target directories remain independent and can install concurrently.

Validation: native Model Library svelte-check and production build passed. The server model installer regression test starts sibling variants together and verifies both installations and the shared sidecar; server_model_installer_test, package_manager_modelscope_test, and package_manager_http_test all passed. All builds and test artifacts were kept under /tmp/audio-cpp-issue1075.

Resolves #1075

Allow users to start downloads for multiple package variants in one model family from the Model Library. Keep download controls available for sibling packages while preventing duplicate requests for the same package. Preserve update and removal guards while any package in the family is active.

Serialize package installation transactions that share a target directory. Variants can share sidecar files, so concurrent publication into the same directory could otherwise race. Packages with different target directories remain independent and can install concurrently.

Validation: native Model Library svelte-check and production build passed. The server model installer regression test starts sibling variants together and verifies both installations and the shared sidecar; server_model_installer_test, package_manager_modelscope_test, and package_manager_http_test all passed. All builds and test artifacts were kept under /tmp/audio-cpp-issue1075.

Resolves 0xShug0#1075
@0xShug0
0xShug0 marked this pull request as ready for review October 25, 2026 21:03
@0xShug0

0xShug0 commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

@ZeroDot1 Ready for review? I'm not sure whether the PR was marked as a draft because of the three-PR limit I set or because it's actually not ready.

@ZeroDot1

Copy link
Copy Markdown
Contributor Author

@0xShug0 It's done; it was just a draft because of the limits.

@0xShug0

0xShug0 commented Oct 26, 2026

Copy link
Copy Markdown
Owner

@ZeroDot1 Found one cancellation regression:

If package A is downloading and sibling B waits for the same directory, stopping B cannot finish until A completes. The new blocking mutex acquisition doesn’t check cancellation.

Replace the blocking target-directory mutex wait with a cancellable wait. Installs queued behind a sibling package now check the cancellation flag every 50 ms and abort promptly instead of waiting for the active download to finish. The lock is released automatically when an install exits, including on cancellation or error.
Extend the native model installer fixture with a second package sharing the active package's target directory. Verify a sibling install queued behind a slow download accepts cancellation, reaches the cancelled state promptly, and does not interfere with the active install or publish partial files.
@0xShug0
0xShug0 merged commit e98fff2 into 0xShug0:main Oct 27, 2026
7 checks passed
@0xShug0

0xShug0 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

@ZeroDot1 Thanks! PR merged.

@0xShug0

0xShug0 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

While testing this PR, I also found another bug that already exists on main 😄 start A → queue sibling B → stop B → click B’s “Clean partial download.” A then fails with No such file or directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Allow multiple files to be downloaded in the model library

2 participants