Fix for CPU mode

Recent optimizations caused the CPU version to load in an incompatible format, now we convert it back to the correct format after loading it efficiently first.
This commit is contained in:
henk717
2021-11-27 05:34:29 +01:00
committed by GitHub
parent 56c2e619f9
commit b56ee07ffa

View File

@ -291,7 +291,7 @@ def device_config(model):
print("Nothing assigned to a GPU, reverting to CPU only mode")
vars.breakmodel = False
vars.usegpu = False
model = model.to('cpu')
model = model.to('cpu').float()
generator = model.generate
return
model.half().to('cpu')