text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

download_model.py has no permissions at all

Open MushMello opened this issue 1 year ago • 2 comments

Describe the bug

If I try to download anything with it, I get a PermissionError. For example with gptj-6B:

File "/home/dipper/conda3/envs/textgen/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: 'models/EleutherAI_gpt-j-6B'

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

use "python download-model.py organization/model"

Screenshot

No response

Logs

(textgen) dipper@MeinPCXDROFLLOL:/text-generation-webui$ python download-model.py EleutherAI/gpt-j-6B --text-only
Traceback (most recent call last):
  File "/text-generation-webui/download-model.py", line 270, in <module>
    download_model_files(model, branch, links, sha256, output_folder, threads=args.threads)
  File "/text-generation-webui/download-model.py", line 193, in download_model_files
    output_folder.mkdir()
  File "/home/dipper/conda3/envs/textgen/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: 'models/EleutherAI_gpt-j-6B'

System Info

OS: Win11
GPU: RTX 3090
CPU: i7 12700KF

MushMello avatar Apr 12 '23 18:04 MushMello

If I put the org/model in quotes (python download-model.py "EleutherAI/gpt-j-6B" --text-only) it gives me this:

Traceback (most recent call last): File "/text-generation-webui/download-model.py", line 270, in download_model_files(model, branch, links, sha256, output_folder, threads=args.threads) File "/text-generation-webui/download-model.py", line 194, in download_model_files with open(output_folder / 'huggingface-metadata.txt', 'w') as f: PermissionError: [Errno 13] Permission denied: 'models/EleutherAI_gpt-j-6B/huggingface-metadata.txt'

MushMello avatar Apr 12 '23 18:04 MushMello

First, thanks so much to mr. gooba for making this lovely program. It truly brings the software to the people. Unfortunately, I think I have a similar problem to mr. mushmello. Incidently, It still occurs when I'm logged into huggingface. I'm sure ooba doesn't know this though.

ISSUE: When I use the gui to "download custom model or LoRA" or use "bash downloadmodel.sh" I get something like this: Then type the name of your desired Hugging Face model in the format organization/name.

EXAMPLE: Input> rahular/itihasa Traceback (most recent call last): File "/home/ana/oobabooga/text-generation-webui/download-model.py", line 267, in links, sha256, is_lora = get_download_links_from_huggingface(model, branch, text_only=args.text_only) File "/home/ana/oobabooga/text-generation-webui/download-model.py", line 102, in get_download_links_from_huggingface r.raise_for_status() File "/home/ana/oobabooga/installer_files/env/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/models/rahular/itihasa/tree/main

TO REPRODUCE: bash download-model.sh

choose "L" for "manually choose a hugging face model" type in: "rahular/itihasa"

Or use gui.

caterpillarpants avatar Apr 25 '23 00:04 caterpillarpants

This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.

github-actions[bot] avatar Sep 06 '23 23:09 github-actions[bot]