jhj0517
commited on
Commit
·
7f08e0c
1
Parent(s):
bc27460
Add progress
Browse files
modules/live_portrait/live_portrait_inferencer.py
CHANGED
@@ -335,7 +335,9 @@ class LivePortraitInferencer:
|
|
335 |
out_imgs = torch.cat([pil2tensor(img_rgb) for img_rgb in out_list])
|
336 |
return out_imgs
|
337 |
|
338 |
-
def download_if_no_models(self
|
|
|
|
|
339 |
for model_name, model_url in MODELS_URL.items():
|
340 |
if model_url.endswith(".pt"):
|
341 |
model_name += ".pt"
|
|
|
335 |
out_imgs = torch.cat([pil2tensor(img_rgb) for img_rgb in out_list])
|
336 |
return out_imgs
|
337 |
|
338 |
+
def download_if_no_models(self,
|
339 |
+
progress=gr.Progress()):
|
340 |
+
progress(0, desc="Downloading models...")
|
341 |
for model_name, model_url in MODELS_URL.items():
|
342 |
if model_url.endswith(".pt"):
|
343 |
model_name += ".pt"
|