Skip to content

[Feature] Support download from modelscope#35

Merged
sxy-trans-n merged 11 commits intoTrans-N-ai:mainfrom
BBBOND:feature/support_download_from_modelscope
Jun 25, 2025
Merged

[Feature] Support download from modelscope#35
sxy-trans-n merged 11 commits intoTrans-N-ai:mainfrom
BBBOND:feature/support_download_from_modelscope

Conversation

@BBBOND
Copy link
Contributor

@BBBOND BBBOND commented Jun 20, 2025

Feature

  1. Support download from modelscope with environment "SWAMA_REGISTRY" equals "MODEL_SCOPE", and default use "HUGGING_FACE"

ModelScope is a Hugging Face-like platform developed in China, add this support to provide Chinese users with a more accessible and user-friendly experience.

@BBBOND BBBOND changed the title Feature/support download from modelscope [Feature] Support download from modelscope Jun 20, 2025
@sxy-trans-n sxy-trans-n self-requested a review June 23, 2025 06:10
@sxy-trans-n
Copy link
Collaborator

Thanks for the PR!

Just a heads-up — the latest main branch now includes Whisper support, and its file structure is a bit different from the others. It also depends on files from two separate repos.

It looks like your PR doesn’t include those changes yet. Could you update your branch to the latest main and integrate the Whisper-related updates accordingly? Let me know if you’d like me to point out the key changes — happy to help!

@BBBOND
Copy link
Contributor Author

BBBOND commented Jun 23, 2025

Just a heads-up — the latest main branch now includes Whisper support, and its file structure is a bit different from the others. It also depends on files from two separate repos.

I see. I will support it too.

@BBBOND
Copy link
Contributor Author

BBBOND commented Jun 23, 2025

@sxy-trans-n Everything is OK.

let fileName = (url as NSString).substring(with: match.range(at: 2))
// the last part after the last / is the file name, the part before the last / is the folder name
let fileFolderName = fileName.split(separator: "/").dropLast().joined(separator: "/")
let fileRealName = fileName.split(separator: "/").last ?? ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like fileRealName was never used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@sxy-trans-n
Copy link
Collaborator

High code duplication between ModelScopeDownloader and HuggingFaceDownloader

@BBBOND BBBOND requested a review from sxy-trans-n June 24, 2025 16:02
@BBBOND
Copy link
Contributor Author

BBBOND commented Jun 24, 2025

@sxy-trans-n I have abstracted the code that I believe is necessary.

@sxy-trans-n sxy-trans-n merged commit 2470212 into Trans-N-ai:main Jun 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants