mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
new middleware handler and ability to restart server on-the-fly
This commit is contained in:
@@ -103,6 +103,9 @@ def cleanup_models():
|
||||
src_path = os.path.join(root_path, "repositories/latent-diffusion/experiments/pretrained_models/")
|
||||
dest_path = os.path.join(models_path, "LDSR")
|
||||
move_files(src_path, dest_path)
|
||||
src_path = os.path.join(root_path, "ScuNET")
|
||||
dest_path = os.path.join(models_path, "ScuNET")
|
||||
move_files(src_path, dest_path)
|
||||
|
||||
|
||||
def move_files(src_path: str, dest_path: str, ext_filter: str = None):
|
||||
@@ -134,11 +137,9 @@ forbidden_upscaler_classes = set()
|
||||
|
||||
def list_builtin_upscalers():
|
||||
load_upscalers()
|
||||
|
||||
builtin_upscaler_classes.clear()
|
||||
builtin_upscaler_classes.extend(Upscaler.__subclasses__())
|
||||
|
||||
|
||||
def forbid_loaded_nonbuiltin_upscalers():
|
||||
for cls in Upscaler.__subclasses__():
|
||||
if cls not in builtin_upscaler_classes:
|
||||
|
||||
Reference in New Issue
Block a user