set default max_models to 2 internally as well as as arg

This commit is contained in:
Lincoln Stein 2022-10-31 09:05:38 -04:00
parent 0c8f0e3386
commit 80f2cfe3e3
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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):