small f-string fix in generate.py

Probably low priority, but helps the error message be more clear by hopefully displaying model_name.
This commit is contained in:
gogurtenjoyer 2023-02-02 19:33:17 -08:00 committed by GitHub
parent e04cb70c7c
commit 16356d5225
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -847,7 +847,7 @@ class Generate:
# the model cache does the loading and offloading
cache = self.model_manager
if not cache.valid_model(model_name):
raise KeyError('** "{model_name}" is not a known model name. Cannot change.')
raise KeyError(f'** "{model_name}" is not a known model name. Cannot change.')
cache.print_vram_usage()