From 271d846ed4e1f536f2bfa44a32ebfaa25e397729 Mon Sep 17 00:00:00 2001 From: LielinJiang <50691816+LielinJiang@users.noreply.github.com> Date: Fri, 30 Oct 2020 10:34:02 +0800 Subject: [PATCH] fix first order model output dir error (#62) --- ppgan/apps/first_order_predictor.py | 2 ++ ppgan/utils/download.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ppgan/apps/first_order_predictor.py b/ppgan/apps/first_order_predictor.py index c0f6dde..7fe981a 100644 --- a/ppgan/apps/first_order_predictor.py +++ b/ppgan/apps/first_order_predictor.py @@ -81,6 +81,8 @@ class FirstOrderPredictor(BasePredictor): weight_path = get_path_from_url(vox_cpk_weight_url) self.weight_path = weight_path + if not os.path.exists(output): + os.makedirs(output) self.output = output self.relative = relative self.adapt_scale = adapt_scale diff --git a/ppgan/utils/download.py b/ppgan/utils/download.py index 49e1d06..e9411a2 100644 --- a/ppgan/utils/download.py +++ b/ppgan/utils/download.py @@ -111,7 +111,7 @@ def _download(url, path, md5sum=None): raise RuntimeError("Download from {} failed. " "Retry limit reached".format(url)) - logger.info("Downloading {} from {}".format(fname, url)) + logger.info("Downloading {} from {} to {}".format(fname, url, fullname)) req = requests.get(url, stream=True) if req.status_code != 200: -- GitLab