Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -16,11 +16,11 @@ gpu_id = 0
|
|
16 |
device = f'cuda:{gpu_id}' if torch.cuda.is_available() else 'cpu'
|
17 |
|
18 |
from modelscope import snapshot_download
|
19 |
-
model_dir = snapshot_download(
|
20 |
model_id = 'AI-ModelScope/RMBG-2.0',
|
21 |
-
local_dir = '
|
|
|
22 |
)
|
23 |
-
print(model_dir)
|
24 |
|
25 |
# from huggingface_hub import snapshot_download, hf_hub_download
|
26 |
# snapshot_download( # 下载整个仓库; 下briaai/RMBG-2.0需要token
|
|
|
16 |
device = f'cuda:{gpu_id}' if torch.cuda.is_available() else 'cpu'
|
17 |
|
18 |
from modelscope import snapshot_download
|
19 |
+
model_dir = snapshot_download( # https://www.modelscope.cn/models/AI-ModelScope/RMBG-2.0
|
20 |
model_id = 'AI-ModelScope/RMBG-2.0',
|
21 |
+
local_dir = 'test_res/RMBG-2.0',
|
22 |
+
ignore_file_pattern = ['onnx*'],
|
23 |
)
|
|
|
24 |
|
25 |
# from huggingface_hub import snapshot_download, hf_hub_download
|
26 |
# snapshot_download( # 下载整个仓库; 下briaai/RMBG-2.0需要token
|