enhance support for model switching and editing

- Error checks for invalid model
- Add !del_model command to invoke.py
- Add del_model() method to model_cache
- Autocompleter kept in sync with model addition/subtraction.
This commit is contained in:
Lincoln Stein
2022-10-15 15:46:29 -04:00
parent fe2a2cfc8b
commit a705a5a0aa
5 changed files with 75 additions and 11 deletions

View File

@ -683,8 +683,7 @@ class Generate:
model_data = self.model_cache.get_model(model_name)
if model_data is None or len(model_data) == 0:
print(f'** Model switch failed **')
return self.model
return None
self.model = model_data['model']
self.width = model_data['width']