Merge pull request #6234 from menloresearch/fix/download-model
fix: downloaded model should from variant level instead of the model level
This commit is contained in:
commit
109b6e8c3d
@ -146,13 +146,14 @@ function Hub() {
|
|||||||
}
|
}
|
||||||
// Apply downloaded filter
|
// Apply downloaded filter
|
||||||
if (showOnlyDownloaded) {
|
if (showOnlyDownloaded) {
|
||||||
filtered = filtered?.filter((model) =>
|
filtered = filtered?.map((model) => ({
|
||||||
model.quants.some((variant) =>
|
...model,
|
||||||
|
quants: model.quants.filter((variant) =>
|
||||||
llamaProvider?.models.some(
|
llamaProvider?.models.some(
|
||||||
(m: { id: string }) => m.id === variant.model_id
|
(m: { id: string }) => m.id === variant.model_id
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
})).filter((model) => model.quants.length > 0)
|
||||||
}
|
}
|
||||||
// Add HuggingFace repo at the beginning if available
|
// Add HuggingFace repo at the beginning if available
|
||||||
if (huggingFaceRepo) {
|
if (huggingFaceRepo) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user