Skip to content

Commit

Permalink
small f-string syntax fix in generate.py (#2483)
Browse files Browse the repository at this point in the history
Probably low priority, but helps the error message be more clear by
hopefully displaying model_name.
  • Loading branch information
lstein committed Feb 3, 2023
2 parents 01a2b8c + 4500c8b commit 0d141c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldm/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ def set_model(self,model_name):
# 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()

Expand Down

0 comments on commit 0d141c1

Please sign in to comment.