Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/utils/hub.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ function isValidHfModelId(string) {
export async function getFile(urlOrPath) {

if (env.useFS && !isValidUrl(urlOrPath, ['http:', 'https:', 'blob:'])) {
return new FileResponse(urlOrPath.toString());

return new FileResponse(urlOrPath instanceof URL ? urlOrPath.pathname : urlOrPath);
} else if (typeof process !== 'undefined' && process?.release?.name === 'node') {
const IS_CI = !!process.env?.TESTING_REMOTELY;
const version = env.version;
Expand Down