OSError: stabilityai/sdxl-turbo does not appear to have a file named config.json.

#35
by AlgorithmicKing - opened

i am getting this error:
Token has not been saved to git credential helper. Pass add_to_git_credential=True if you want to set the git credential as well.
Token is valid (permission: write).
Your token has been saved to C:\Users\freep.cache\huggingface\token
Login successful
Traceback (most recent call last):
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\huggingface_hub\utils_errors.py", line 304, in hf_raise_for_status
response.raise_for_status()
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co./stabilityai/sdxl-turbo/resolve/main/config.json

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

Traceback (most recent call last):
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\transformers\utils\hub.py", line 398, in cached_file
resolved_file = hf_hub_download(
^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\huggingface_hub\file_download.py", line 1261, in hf_hub_download
metadata = get_hf_file_metadata(
^^^^^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\huggingface_hub\file_download.py", line 1667, in get_hf_file_metadata
r = _request_wrapper(
^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\huggingface_hub\file_download.py", line 385, in _request_wrapper
response = _request_wrapper(
^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\huggingface_hub\file_download.py", line 409, in _request_wrapper
hf_raise_for_status(response)
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\huggingface_hub\utils_errors.py", line 315, in hf_raise_for_status
raise EntryNotFoundError(message, response) from e
huggingface_hub.utils._errors.EntryNotFoundError: 404 Client Error. (Request ID: Root=1-65f18f3c-35ea68be46924d5c57499a7c;a900952e-b333-4bf5-81d6-7c9ad00f0f03)

Entry Not Found for url: https://huggingface.co./stabilityai/sdxl-turbo/resolve/main/config.json.

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

Traceback (most recent call last):
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\main.py", line 7, in
model = transformers.AutoModelForSequenceClassification.from_pretrained("stabilityai/sdxl-turbo")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\transformers\models\auto\auto_factory.py", line 521, in from_pretrained
config, kwargs = AutoConfig.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\transformers\models\auto\configuration_auto.py", line 1111, in from_pretrained
config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\transformers\configuration_utils.py", line 633, in get_config_dict
config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\transformers\configuration_utils.py", line 688, in _get_config_dict
resolved_config_file = cached_file(
^^^^^^^^^^^^
File "I:\WORK\PROGRAMMING\PYTHON\Stable Diffusion SDXL Turbo\venv\Lib\site-packages\transformers\utils\hub.py", line 452, in cached_file
raise EnvironmentError(
OSError: stabilityai/sdxl-turbo does not appear to have a file named config.json. Checkout 'https://huggingface.co./stabilityai/sdxl-turbo/main' for available files.

this is my code:
import transformers
from huggingface_hub import login

login("mylogincode")

Load the model directly from the Hugging Face Hub

model = transformers.AutoModelForSequenceClassification.from_pretrained("stabilityai/sdxl-turbo")

Hi. I am getting the same error. How did you fix it?

Sign up or log in to comment