mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
restore automatic conversion of legacy files to diffusers pipelines
This commit is contained in:
parent
81dee04dc9
commit
b33655b0d6
@ -333,10 +333,23 @@ class ModelManager(object):
|
|||||||
|
|
||||||
tic = time.time()
|
tic = time.time()
|
||||||
|
|
||||||
with warnings.catch_warnings():
|
# this does the work
|
||||||
warnings.simplefilter("ignore")
|
model_format = mconfig.get("format", "ckpt")
|
||||||
model, width, height, model_hash = self._load_diffusers_model(mconfig)
|
if model_format == "ckpt":
|
||||||
|
weights = mconfig.weights
|
||||||
|
print(f">> Loading {model_name} from {weights}")
|
||||||
|
model, width, height, model_hash = self._load_ckpt_model(
|
||||||
|
model_name, mconfig
|
||||||
|
)
|
||||||
|
elif model_format == "diffusers":
|
||||||
|
with warnings.catch_warnings():
|
||||||
|
warnings.simplefilter("ignore")
|
||||||
|
model, width, height, model_hash = self._load_diffusers_model(mconfig)
|
||||||
|
else:
|
||||||
|
raise NotImplementedError(
|
||||||
|
f"Unknown model format {model_name}: {model_format}"
|
||||||
|
)
|
||||||
|
|
||||||
# usage statistics
|
# usage statistics
|
||||||
toc = time.time()
|
toc = time.time()
|
||||||
print(">> Model loaded in", "%4.2fs" % (toc - tic))
|
print(">> Model loaded in", "%4.2fs" % (toc - tic))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user