mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
Update LoRA.py - avoid potential error (#2953)
This commit is contained in:
parent
33f56fd41d
commit
c23c88ee4c
@ -106,6 +106,8 @@ def add_lora_transformers(lora_names):
|
||||
|
||||
# If any LoRA needs to be removed, start over
|
||||
if len(removed_set) > 0:
|
||||
# shared.model may no longer be PeftModel
|
||||
if hasattr(shared.model, 'disable_adapter'):
|
||||
shared.model.disable_adapter()
|
||||
shared.model = shared.model.base_model.model
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user