ckpt model conversion now done in ModelCache

This commit is contained in:
Lincoln Stein
2023-05-08 23:39:44 -04:00
parent a108155544
commit 9cb962cad7
5 changed files with 134 additions and 61 deletions

View File

@ -54,10 +54,6 @@ def main():
"--weights argument has been deprecated. Please edit ./configs/models.yaml, and select the weights using --model instead."
)
sys.exit(-1)
if args.max_loaded_models is not None:
if args.max_loaded_models <= 0:
print("--max_loaded_models must be >= 1; using 1")
args.max_loaded_models = 1
# alert - setting a few globals here
Globals.try_patchmatch = args.patchmatch
@ -136,7 +132,7 @@ def main():
esrgan=esrgan,
free_gpu_mem=opt.free_gpu_mem,
safety_checker=opt.safety_checker,
max_loaded_models=opt.max_loaded_models,
max_cache_size=opt.max_cache_size,
)
except (FileNotFoundError, TypeError, AssertionError) as e:
report_model_error(opt, e)