File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,23 @@ check_and_prepare_model() {
167167 echo -e " \e[32mconverted_model_path: $converted_model_path \e[0m" >&2
168168 apt-get update -qq >&2 && apt-get install -y --no-install-recommends git-lfs jq >&2
169169 git lfs install >&2
170- git clone " $model_url " " $model_path " >&2 # TODO(wangkang): need check for clone if successful
170+ GIT_LFS_SKIP_SMUDGE=1 git clone " $model_url " " $model_path " >&2
171+ if [ $? -ne 0 ]; then
172+ echo " Error: git clone failed." >&2
173+ exit 1
174+ fi
175+
176+ cd " $model_path " || { echo " Error: failed to cd into $model_path " >&2 ; exit 1; }
177+
178+ # 显示需要下载的 LFS 文件(可选)
179+ git lfs ls-files >&2
180+
181+ # 拉取大文件(带进度条)
182+ git lfs pull >&2
183+ if [ $? -ne 0 ]; then
184+ echo " Error: git lfs pull failed." >&2
185+ exit 1
186+ fi
171187 echo " √ Model download completed." >&2
172188
173189
You can’t perform that action at this time.
0 commit comments