fix: when model_id is an local dir, don't try to download model from remote
parent
e3eae370be
commit
950a7a795f
|
|
@ -51,6 +51,11 @@ impl metadata::Metadata {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn download_model(model_id: &str, prefer_local_file: bool) {
|
pub async fn download_model(model_id: &str, prefer_local_file: bool) {
|
||||||
|
if fs::metadata(model_id).is_ok() {
|
||||||
|
// Local path, no need for downloading.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let mut metadata = metadata::Metadata::from(model_id).await;
|
let mut metadata = metadata::Metadata::from(model_id).await;
|
||||||
|
|
||||||
metadata
|
metadata
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue