text-generation-webui
text-generation-webui copied to clipboard
'WindowsPath' object has no attribute 'endswith' in windows10
Describe the bug
Got a bug when work with https://github.com/oobabooga/text-generation-webui:
Loading llama-7b-hf...
Loading model ...
Traceback (most recent call last):
File "C:\Users\innig\oobabooga\text-generation-webui\server.py", line 194, in <module>
shared.model, shared.tokenizer = load_model(shared.model_name)
File "C:\Users\innig\oobabooga\text-generation-webui\modules\models.py", line 119, in load_model
model = load_quant(path_to_model, Path(f"models/{pt_model}"), 4)
File "C:\Users\innig\oobabooga\text-generation-webui\repositories\GPTQ-for-LLaMa\llama.py", line 241, in load_quant
if checkpoint.endswith('.safetensors'):
AttributeError: 'WindowsPath' object has no attribute 'endswith'
Fixed it on my PC with replacing in llama.py
if checkpoint.endswith('.safetensors'):
to
if str(checkpoint).endswith('.safetensors'):
Is there an existing issue for this?
- [X] I have searched the existing issues
Reproduction
Just use in on win10
Screenshot
No response
Logs
Loading llama-7b-hf...
Loading model ...
Traceback (most recent call last):
File "C:\Users\innig\oobabooga\text-generation-webui\server.py", line 194, in <module>
shared.model, shared.tokenizer = load_model(shared.model_name)
File "C:\Users\innig\oobabooga\text-generation-webui\modules\models.py", line 119, in load_model
model = load_quant(path_to_model, Path(f"models/{pt_model}"), 4)
File "C:\Users\innig\oobabooga\text-generation-webui\repositories\GPTQ-for-LLaMa\llama.py", line 241, in load_quant
if checkpoint.endswith('.safetensors'):
AttributeError: 'WindowsPath' object has no attribute 'endswith'
System Info
windows10, RTX3060
Your local copy of the repository is not up to date. This has already been fixed.
git pull
This issue has been closed due to inactivity for 30 days. If you believe it is still relevant, please leave a comment below.
Getting same issue. AttributeError: 'WindowsPath' object has no attribute 'endswith'
How to solve this?