diff --git a/src/utils/hub.js b/src/utils/hub.js index 092e50c2f..93617674c 100644 --- a/src/utils/hub.js +++ b/src/utils/hub.js @@ -398,7 +398,7 @@ export async function getModelFile(path_or_repo_id, filename, fatal = true, opti env.remoteHost, env.remotePathTemplate .replaceAll('{model}', path_or_repo_id) - .replaceAll('{revision}', revision), + .replaceAll('{revision}', encodeURIComponent(revision)), filename );