/
githubmirror
/
faceswap
Обзор
Документация
Войти
/
githubmirror
/
faceswap
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
plugins/convert/convert_config.py
41 строка
1017 B
torzdf
Extraction Overhaul (#1533)
21 мар 2026, 02:52
Не верифицирован
21 мар 2026, 02:52
d217812
Код
Авторство
О чём код?
#!/usr/bin/env python3 """ Default configurations for convert """ import logging import os from lib.config import FaceswapConfig logger = logging.getLogger(__name__) class _Config(FaceswapConfig): """ Config File for Convert """ def set_defaults(self, helptext=""): """ Set the default values for config """ super().set_defaults(helptext=helptext) self._defaults_from_plugin(os.path.dirname(__file__)) _CONFIG: _Config | None = None def load_config(config_file: str | None = None) -> _Config: """ Load the Extraction configuration .ini file Parameters ---------- config_file : str | None, optional Path to a custom .ini configuration file to load. Default: ``None`` (use default configuration file) Returns ------- :class:`_Config` The loaded convert config object """ global _CONFIG # pylint:disable=global-statement if _CONFIG is None: _CONFIG = _Config(config_file=config_file) return _CONFIG