mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix dangling reference to _model_to_cpu and missing variable model_description
This commit is contained in:
@ -500,7 +500,6 @@ class ModelManager(object):
|
|||||||
print(f">> Offloading {model_name} to CPU")
|
print(f">> Offloading {model_name} to CPU")
|
||||||
model = self.models[model_name]["model"]
|
model = self.models[model_name]["model"]
|
||||||
model.offload_all()
|
model.offload_all()
|
||||||
self.models[model_name]["model"] = self._model_to_cpu(model)
|
|
||||||
|
|
||||||
gc.collect()
|
gc.collect()
|
||||||
if self._has_cuda():
|
if self._has_cuda():
|
||||||
@ -558,7 +557,7 @@ class ModelManager(object):
|
|||||||
"""
|
"""
|
||||||
model_name = model_name or Path(repo_or_path).stem
|
model_name = model_name or Path(repo_or_path).stem
|
||||||
model_description = (
|
model_description = (
|
||||||
model_description or f"Imported diffusers model {model_name}"
|
description or f"Imported diffusers model {model_name}"
|
||||||
)
|
)
|
||||||
new_config = dict(
|
new_config = dict(
|
||||||
description=model_description,
|
description=model_description,
|
||||||
|
Reference in New Issue
Block a user