mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4569] [GUI] Image-model downloads honour HF_ENDPOINT like setup and the MTP fetch #5093
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5093
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/4569
Author: @Nyarlathoteppppp
Created: 10/29/2026
Status: 🔄 Open
Base:
main← Head:fix/4369-hf-endpoint-images📝 Commits (1)
e1a0e69image models: downloads honour HF_ENDPOINT like setup and the MTP fetch (#4369)📊 Changes
2 files changed (+16 additions, -1 deletions)
View changed files
📝
apps/host/server/image-models.mjs(+1 -1)📝
apps/host/tests/image-models.test.mjs(+15 -0)📄 Description
Problem and result
apps/host/server/image-models.mjsbuilds the image-modeldownloadUrlwith a literalhttps://huggingface.co, and the installer fetches that URL, soHF_ENDPOINT(honoured since #495 bysetup.pyhf_endpoint()andtools/mtp_fetch.py) does not reach image-model downloads.After the change the download URL uses the same rule as
hf_endpoint():HF_ENDPOINTtrimmed, trailing slashes removed, elsehttps://huggingface.co. The pinned revision, size and hash checks are unchanged.Related discussion
Fixes #4369. Focused fix, no scope change.
Approach
One expression in
library()'sdownloadUrl, read at call time so it follows the host's environment like the other paths. The human-facingsourceUrl(the model page link in the UI) stays on huggingface.co: a mirror does not necessarily serve model pages, and nothing is downloaded from it.Validation
Passed:
node --test apps/host/tests/image-models.test.mjs: the new test (mirror with a trailing slash, surrounding spaces and several slashes, unset, blank,///) fails on46c152aand passes with the fix; 7/7 pass.node --test apps/host/tests/model-directory.test.mjs apps/host/tests/image-models.test.mjs: 12/12 pass.46c152a.Failed:
none observed.
Not run:
full host suite, Windows/Linux, a real download through a mirror.
Limits
none known.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.