No double calls will be made

Do not call load_upscalers in list_builtin_upscalers
This commit is contained in:
Acncagua Slt 2023-05-04 11:59:22 +09:00 committed by GitHub
parent efe98ca090
commit 1bebb50da9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,12 +133,9 @@ forbidden_upscaler_classes = set()
def list_builtin_upscalers(): def list_builtin_upscalers():
load_upscalers()
builtin_upscaler_classes.clear() builtin_upscaler_classes.clear()
builtin_upscaler_classes.extend(Upscaler.__subclasses__()) builtin_upscaler_classes.extend(Upscaler.__subclasses__())
def forbid_loaded_nonbuiltin_upscalers(): def forbid_loaded_nonbuiltin_upscalers():
for cls in Upscaler.__subclasses__(): for cls in Upscaler.__subclasses__():
if cls not in builtin_upscaler_classes: if cls not in builtin_upscaler_classes: