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

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