ariG23498 HF Staff commited on
Commit
5ff1714
·
verified ·
1 Parent(s): badfd11

Upload black-forest-labs_FLUX.2-klein-9B_1.txt with huggingface_hub

Browse files
black-forest-labs_FLUX.2-klein-9B_1.txt ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ```CODE:
2
+ import torch
3
+ from diffusers import DiffusionPipeline
4
+ from diffusers.utils import load_image
5
+
6
+ # switch to "mps" for apple devices
7
+ pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-9B", dtype=torch.bfloat16, device_map="cuda")
8
+
9
+ prompt = "Turn this cat into a dog"
10
+ input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
11
+
12
+ image = pipe(image=input_image, prompt=prompt).images[0]
13
+ ```
14
+
15
+ ERROR:
16
+ Traceback (most recent call last):
17
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 402, in hf_raise_for_status
18
+ response.raise_for_status()
19
+ ~~~~~~~~~~~~~~~~~~~~~~~~~^^
20
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/requests/models.py", line 1026, in raise_for_status
21
+ raise HTTPError(http_error_msg, response=self)
22
+ requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/black-forest-labs/FLUX.2-klein-9B/resolve/main/model_index.json
23
+
24
+ The above exception was the direct cause of the following exception:
25
+
26
+ Traceback (most recent call last):
27
+ File "/tmp/black-forest-labs_FLUX.2-klein-9B_1JiYCYy.py", line 28, in <module>
28
+ pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-9B", dtype=torch.bfloat16, device_map="cuda")
29
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
30
+ return fn(*args, **kwargs)
31
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 829, in from_pretrained
32
+ cached_folder = cls.download(
33
+ pretrained_model_name_or_path,
34
+ ...<14 lines>...
35
+ **kwargs,
36
+ )
37
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
38
+ return fn(*args, **kwargs)
39
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/diffusers/pipelines/pipeline_utils.py", line 1605, in download
40
+ config_file = hf_hub_download(
41
+ pretrained_model_name,
42
+ ...<5 lines>...
43
+ token=token,
44
+ )
45
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
46
+ return fn(*args, **kwargs)
47
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1007, in hf_hub_download
48
+ return _hf_hub_download_to_cache_dir(
49
+ # Destination
50
+ ...<14 lines>...
51
+ force_download=force_download,
52
+ )
53
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1114, in _hf_hub_download_to_cache_dir
54
+ _raise_on_head_call_error(head_call_error, force_download, local_files_only)
55
+ ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1655, in _raise_on_head_call_error
57
+ raise head_call_error
58
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1543, in _get_metadata_or_catch_error
59
+ metadata = get_hf_file_metadata(
60
+ url=url, proxies=proxies, timeout=etag_timeout, headers=headers, token=token, endpoint=endpoint
61
+ )
62
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
63
+ return fn(*args, **kwargs)
64
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 1460, in get_hf_file_metadata
65
+ r = _request_wrapper(
66
+ method="HEAD",
67
+ ...<5 lines>...
68
+ timeout=timeout,
69
+ )
70
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 283, in _request_wrapper
71
+ response = _request_wrapper(
72
+ method=method,
73
+ ...<2 lines>...
74
+ **params,
75
+ )
76
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/file_download.py", line 307, in _request_wrapper
77
+ hf_raise_for_status(response)
78
+ ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
79
+ File "/tmp/.cache/uv/environments-v2/c056ef216bacca27/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 419, in hf_raise_for_status
80
+ raise _format(GatedRepoError, message, response) from e
81
+ huggingface_hub.errors.GatedRepoError: 403 Client Error. (Request ID: Root=1-6969e5ea-6dcb569e7e17ef55641fee41;040de5a3-e689-4333-ae9d-fba06e330d6f)
82
+
83
+ Cannot access gated repo for url https://huggingface.co/black-forest-labs/FLUX.2-klein-9B/resolve/main/model_index.json.
84
+ Access to model black-forest-labs/FLUX.2-klein-9B is restricted and you are not in the authorized list. Visit https://huggingface.co/black-forest-labs/FLUX.2-klein-9B to ask for access.