mirror of
https://github.com/HumanAIGC/lite-avatar.git
synced 2026-02-04 09:29:19 +08:00
feat: support download model from modelscope rather than git lfs
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -4,4 +4,7 @@ __pycache__
|
|||||||
|
|
||||||
lm.pb
|
lm.pb
|
||||||
model_1.onnx
|
model_1.onnx
|
||||||
model.pb
|
model.pb
|
||||||
|
*.msc
|
||||||
|
lite_avatar_weights/
|
||||||
|
*.mv
|
||||||
10
README.md
10
README.md
@@ -11,6 +11,16 @@ We recommend a python version = 3.10 and cuda version = 11.8. Then build environ
|
|||||||
```shell
|
```shell
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Model Preparation
|
||||||
|
```shell
|
||||||
|
# for windows
|
||||||
|
download_model.bat
|
||||||
|
|
||||||
|
# for linux
|
||||||
|
bash download_model.sh
|
||||||
|
```
|
||||||
|
|
||||||
## Inference
|
## Inference
|
||||||
```
|
```
|
||||||
python lite_avatar.py --data_dir /path/to/sample_data --audio_file /path/to/audio.wav --result_dir /path/to/result
|
python lite_avatar.py --data_dir /path/to/sample_data --audio_file /path/to/audio.wav --result_dir /path/to/result
|
||||||
|
|||||||
21
download_model.bat
Normal file
21
download_model.bat
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
@echo off
|
||||||
|
REM Download LiteAvatar model files using modelscope
|
||||||
|
|
||||||
|
echo Downloading LiteAvatar model files...
|
||||||
|
|
||||||
|
modelscope download --model HumanAIGC-Engineering/LiteAvatarGallery lite_avatar_weights/lm.pb lite_avatar_weights/model_1.onnx lite_avatar_weights/model.pb --local_dir ./
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo Error downloading lite_avatar_weights
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
@REM move file
|
||||||
|
move lite_avatar_weights\lm.pb ./weights/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/lm/
|
||||||
|
move lite_avatar_weights\model_1.onnx ./weights/
|
||||||
|
move lite_avatar_weights\model.pb ./weights/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/
|
||||||
|
|
||||||
|
@REM remove folder
|
||||||
|
rmdir lite_avatar_weights
|
||||||
|
|
||||||
|
echo All model files downloaded successfully!
|
||||||
@@ -1,3 +1,16 @@
|
|||||||
modelscope download --model HumanAIGC-Engineering/LiteAvatarGallery lite_avatar_weights/lm.pb --local_dir ./weights/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/lm/
|
#!/bin/bash
|
||||||
modelscope download --model HumanAIGC-Engineering/LiteAvatarGallery lite_avatar_weights/model_1.onnx --local_dir ./weights/
|
|
||||||
modelscope download --model HumanAIGC-Engineering/LiteAvatarGallery lite_avatar_weights/model.pb --local_dir ./weights/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/
|
# download model
|
||||||
|
echo "Downloading LiteAvatar model files..."
|
||||||
|
|
||||||
|
modelscope download --model HumanAIGC-Engineering/LiteAvatarGallery lite_avatar_weights/lm.pb lite_avatar_weights/model_1.onnx lite_avatar_weights/model.pb --local_dir ./
|
||||||
|
|
||||||
|
# move file
|
||||||
|
mv lite_avatar_weights/lm.pb ./weights/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/lm/
|
||||||
|
mv lite_avatar_weights/model_1.onnx ./weights/
|
||||||
|
mv lite_avatar_weights/model.pb ./weights/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/
|
||||||
|
|
||||||
|
# remove folder
|
||||||
|
rm -rf lite_avatar_weights
|
||||||
|
|
||||||
|
echo "All model files downloaded successfully!"
|
||||||
|
|||||||
Reference in New Issue
Block a user