Spaces:
Runtime error
Runtime error
Download gfpgan/models/__init__.py from FuzzKill/facefusion: direct link, hf CLI and curl.
- Browser
- Download file 506 Bytes
-
https://huggingface.co/spaces/FuzzKill/facefusion/resolve/main/gfpgan/models/__init__.py
- Command line
-
hf download hf://spaces/FuzzKill/facefusion/gfpgan/models/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/FuzzKill/facefusion/resolve/main/gfpgan/models/__init__.py
506 Bytes
| import importlib | |
| from basicsr.utils import scandir | |
| from os import path as osp | |
| # automatically scan and import model modules for registry | |
| # scan all the files that end with '_model.py' under the model folder | |
| model_folder = osp.dirname(osp.abspath(__file__)) | |
| model_filenames = [osp.splitext(osp.basename(v))[0] for v in scandir(model_folder) if v.endswith('_model.py')] | |
| # import all the model modules | |
| _model_modules = [importlib.import_module(f'gfpgan.models.{file_name}') for file_name in model_filenames] | |