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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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')