Merge branch 'main' into lstein/remove-hardcoded-cuda-device

This commit is contained in:
Lincoln Stein 2023-07-03 14:10:47 -04:00 committed by GitHub
commit fc419546bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,7 +423,7 @@ class ModelManager(object):
if submodel_type is not None and hasattr(model_config, submodel_type):
override_path = getattr(model_config, submodel_type)
if override_path:
model_path = override_path
model_path = self.app_config.root_path / override_path
model_type = submodel_type
submodel_type = None
model_class = MODEL_CLASSES[base_model][model_type]
@ -431,6 +431,7 @@ class ModelManager(object):
# TODO: path
# TODO: is it accurate to use path as id
dst_convert_path = self._get_model_cache_path(model_path)
model_path = model_class.convert_if_required(
base_model=base_model,
model_path=str(model_path), # TODO: refactor str/Path types logic