mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Do not assign the result of SpandrelImageToImageModel.load_from_file(...) during probe to ensure that the model is immediately gc'd.
This commit is contained in:
parent
d09999736c
commit
0ce6ec634d
@ -253,7 +253,7 @@ class ModelProbe(object):
|
|||||||
# 2. Spandrel has internal logic to determine a model's type from its state_dict before loading the model.
|
# 2. Spandrel has internal logic to determine a model's type from its state_dict before loading the model.
|
||||||
# This logic is not exposed in spandrel's public API. We could copy the logic here, but then we have to
|
# This logic is not exposed in spandrel's public API. We could copy the logic here, but then we have to
|
||||||
# maintain it, and the risk of false positive detections is higher.
|
# maintain it, and the risk of false positive detections is higher.
|
||||||
_ = SpandrelImageToImageModel.load_from_file(model_path)
|
SpandrelImageToImageModel.load_from_file(model_path)
|
||||||
return ModelType.SpandrelImageToImage
|
return ModelType.SpandrelImageToImage
|
||||||
except spandrel.UnsupportedModelError:
|
except spandrel.UnsupportedModelError:
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user