Open SeattleUser0 opened 1 year ago
add the extension to the CMD_FLAGS file instead, they changed how they do that on the webui end.
I deleted and reinstalled the extension and added the --extension Playground flag to CMD_FLAGS.txt and got the exact same error message. The module "_mark_only_adapters_as_trainable" is commented out in script.py file; i.e., it isn't being used for anything. I deleted the "import _mark_only_adapters_as_trainable" line and it works again.
I don't know why I had the import there - I probably started something... then forgot about it. The line should be deleted or commented, it's fixed now
I followed the installation instructions exactly with the exception of modifying the webui.py file to add the --extension flag as you can now just check a box for the desired extension in the GUI. The Playground extension fails to load, giving this output:
2023-08-24 09:27:51 ERROR:Failed to load the extension "Playground". Traceback (most recent call last): File "C:\Users\User0\Documents\AI\oobabooga_windows\text-generation-webui\modules\extensions.py", line 35, in load_extensions exec(f"import extensions.{name}.script") File "<string>", line 1, in <module> File "C:\Users\User0\Documents\AI\oobabooga_windows\text-generation-webui\extensions\Playground\script.py", line 18, in <module> from peft.tuners.lora import mark_only_lora_as_trainable ImportError: cannot import name 'mark_only_lora_as_trainable' from 'peft.tuners.lora' (C:\Users\User0\Documents\AI\oobabooga_windows\installer_files\env\lib\site-packages\peft\tuners\lora.py)
And indeed, when I check lora.py, there isn't a method with that name. The closest is _mark_only_adapters_as_trainable.
Visual Studio Code said that the import 'mark_only_lora_as_trainable' wasn't used, so I deleted it from script.py and now it seems to work okay.