From 80f2cfe3e391bb43a5286aa16a9c4675bc5bd062 Mon Sep 17 00:00:00 2001 From: Lincoln Stein Date: Mon, 31 Oct 2022 09:05:38 -0400 Subject: [PATCH] set default max_models to 2 internally as well as as arg --- ldm/generate.py | 2 +- ldm/invoke/model_cache.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ldm/generate.py b/ldm/generate.py index 56acd14738..945b7a98c9 100644 --- a/ldm/generate.py +++ b/ldm/generate.py @@ -146,7 +146,7 @@ class Generate: esrgan=None, free_gpu_mem=False, safety_checker:bool=False, - max_loaded_models:int=3, + max_loaded_models:int=2, # these are deprecated; if present they override values in the conf file weights = None, config = None, diff --git a/ldm/invoke/model_cache.py b/ldm/invoke/model_cache.py index 092fc7a7a2..3380d453c3 100644 --- a/ldm/invoke/model_cache.py +++ b/ldm/invoke/model_cache.py @@ -20,7 +20,7 @@ from omegaconf import OmegaConf from omegaconf.errors import ConfigAttributeError from ldm.util import instantiate_from_config -DEFAULT_MAX_MODELS=3 +DEFAULT_MAX_MODELS=2 class ModelCache(object): def __init__(self, config:OmegaConf, device_type:str, precision:str, max_loaded_models=DEFAULT_MAX_MODELS):