Skip to content

Cannot access gated repo for url https://hf-mirror.com/black-forest-labs/FLUX.1-dev/resolve/main/model_index.json. Access to model black-forest-labs/FLUX.1-dev is restricted. You must have access to it and be authenticated to access it. Please log in. #112

@ucas010

Description

@ucas010

dear 大佬,
这个运行app.py 过程中,出现如题bug,但是该模型我已经下载到./models 下面了,
ls -lht models/FLUX.1-dev/
total 23G
drwxr-xr-x 2 root root 4.0K Jul 8 17:37 transformer
-rw-r--r-- 1 root root 23G Jul 8 16:55 flux1-dev.safetensors
drwxr-xr-x 2 root root 4.0K Jul 8 15:49 text_encoder_2
-rw-r--r-- 1 root root 320M Jul 8 15:27 ae.safetensors
drwxr-xr-x 2 root root 4.0K Jul 8 15:27 vae
drwxr-xr-x 2 root root 4.0K Jul 8 15:26 text_encoder
drwxr-xr-x 2 root root 4.0K Jul 8 15:25 tokenizer_2
-rw-r--r-- 1 root root 1.3M Jul 8 15:25 dev_grid.jpg
drwxr-xr-x 2 root root 4.0K Jul 8 15:25 tokenizer
drwxr-xr-x 2 root root 4.0K Jul 8 15:25 scheduler
-rw-r--r-- 1 root root 536 Jul 8 15:25 model_index.json
-rw-r--r-- 1 root root 19K Jul 8 15:25 LICENSE.md
-rw-r--r-- 1 root root 4.3K Jul 8 15:25 README.md

报错日志,

  warnings.warn(msg)
Traceback (most recent call last):
  File "/data/soft/anaconda3/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 409, in hf_raise_for_status
    response.raise_for_status()
  File "/data/soft/anaconda3/envs/dreamo/lib/python3.10/site-packages/requests/models.py", line 1026, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://hf-mirror.com/black-forest-labs/FLUX.1-dev/resolve/main/model_index.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/data/DreamO/dreamApp.py", line 41, in <module>
    generator = Generator(**vars(args))
  File "/data/DreamO/dreamo_generator.py", line 74, in __init__
    self.dreamo_pipeline_init_default() # default or int8, offload 24GB or 16GB VRAM.
  File "/data/DreamO/dreamo_generator.py", line 82, in dreamo_pipeline_init_default
    self.dreamo_pipeline = DreamOPipeline.from_pretrained(model_root, torch_dtype=torch.bfloat16)
  File "/data/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/data/envs/dreamo/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 773, in from_pretrained
    cached_folder = cls.download(
  File "/data/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/data/envs/dreamo/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1415, in download
    config_file = hf_hub_download(
  File "/data/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/data/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1008, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "/da/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1115, in _hf_hub_download_to_cache_dir
    _raise_on_head_call_error(head_call_error, force_download, local_files_only)
  File "/data3/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1645, in _raise_on_head_call_error
    raise head_call_error
  File "/denvs/dreamo/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1533, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(
  File "/data/soft/anaconda3/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/data3/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 1450, in get_hf_file_metadata
    r = _request_wrapper(
  File "/dat3/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 286, in _request_wrapper
    response = _request_wrapper(
  File "/data/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/file_download.py", line 310, in _request_wrapper
    hf_raise_for_status(response)
  File "/data/envs/dreamo/lib/python3.10/site-packages/huggingface_hub/utils/_http.py", line 426, in hf_raise_for_status
    raise _format(GatedRepoError, message, response) from e
huggingface_hub.errors.GatedRepoError: 401 Client Error. (Request ID: Root=1-686ce6cb-1ade2b3f243757744ab19c77;16be4740-23e1-4a90-af59-947482a14a4c)

Cannot access gated repo for url https://hf-mirror.com/black-forest-labs/FLUX.1-dev/resolve/main/model_index.json.
Access to model black-forest-labs/FLUX.1-dev is restricted. You must have access to it and be authenticated to access it. Please log in.

感谢thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions