mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes
This commit is contained in:
parent
23c22ac933
commit
1ba94a92b3
@ -416,7 +416,7 @@ class ModelManager(object):
|
|||||||
dst_convert_path = self._get_model_cache_path(model_path)
|
dst_convert_path = self._get_model_cache_path(model_path)
|
||||||
model_path = model_class.convert_if_required(
|
model_path = model_class.convert_if_required(
|
||||||
base_model=base_model,
|
base_model=base_model,
|
||||||
model_path=model_path,
|
model_path=str(model_path), # TODO: refactor str/Path types logic
|
||||||
output_path=dst_convert_path,
|
output_path=dst_convert_path,
|
||||||
config=model_config,
|
config=model_config,
|
||||||
)
|
)
|
||||||
@ -569,7 +569,7 @@ class ModelManager(object):
|
|||||||
if clobber or model_key not in self.models:
|
if clobber or model_key not in self.models:
|
||||||
raise Exception(f'Attempt to overwrite existing model definition "{model_key}"')
|
raise Exception(f'Attempt to overwrite existing model definition "{model_key}"')
|
||||||
|
|
||||||
old_model = self.models.pop(model_key, False)
|
old_model = self.models.pop(model_key, None)
|
||||||
if old_model is not None:
|
if old_model is not None:
|
||||||
# TODO: if path changed and old_model.path inside models folder should we delete this too?
|
# TODO: if path changed and old_model.path inside models folder should we delete this too?
|
||||||
|
|
||||||
|
@ -111,8 +111,6 @@ class StableDiffusion1Model(DiffusersModel):
|
|||||||
config: ModelConfigBase,
|
config: ModelConfigBase,
|
||||||
base_model: BaseModelType,
|
base_model: BaseModelType,
|
||||||
) -> str:
|
) -> str:
|
||||||
assert model_path == config.path
|
|
||||||
|
|
||||||
if isinstance(config, cls.CheckpointConfig):
|
if isinstance(config, cls.CheckpointConfig):
|
||||||
return _convert_ckpt_and_cache(
|
return _convert_ckpt_and_cache(
|
||||||
version=BaseModelType.StableDiffusion1,
|
version=BaseModelType.StableDiffusion1,
|
||||||
@ -215,8 +213,6 @@ class StableDiffusion2Model(DiffusersModel):
|
|||||||
config: ModelConfigBase,
|
config: ModelConfigBase,
|
||||||
base_model: BaseModelType,
|
base_model: BaseModelType,
|
||||||
) -> str:
|
) -> str:
|
||||||
assert model_path == config.path
|
|
||||||
|
|
||||||
if isinstance(config, cls.CheckpointConfig):
|
if isinstance(config, cls.CheckpointConfig):
|
||||||
return _convert_ckpt_and_cache(
|
return _convert_ckpt_and_cache(
|
||||||
version=BaseModelType.StableDiffusion2,
|
version=BaseModelType.StableDiffusion2,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user