Commit ac4c7f05 authored by Tpinion's avatar Tpinion
Browse files

Filter out temporary files that will be generated if the download fails.

parent 0cc0ee1b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -55,7 +55,7 @@ def setup_model(dirname):
                if self.net is not None and self.face_helper is not None:
                if self.net is not None and self.face_helper is not None:
                    self.net.to(devices.device_codeformer)
                    self.net.to(devices.device_codeformer)
                    return self.net, self.face_helper
                    return self.net, self.face_helper
                model_paths = modelloader.load_models(model_path, model_url, self.cmd_dir, download_name='codeformer-v0.1.0.pth')
                model_paths = modelloader.load_models(model_path, model_url, self.cmd_dir, download_name='codeformer-v0.1.0.pth', ext_filter=['.pth'])
                if len(model_paths) != 0:
                if len(model_paths) != 0:
                    ckpt_path = model_paths[0]
                    ckpt_path = model_paths[0]
                else:
                else: