Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Stuck at "failed to create model quickly; will retry using slow method" #534

Closed
6 tasks
optimusprimus77 opened this issue Sep 6, 2024 · 9 comments
Closed
6 tasks
Labels
duplicate This issue or pull request already exists not amdgpu specific This issue is related to A1111 upstream.

Comments

@optimusprimus77
Copy link

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

Worked the first and second time with the slow method and downloading 10gb of something, but then my drive was full so I had to delete some stuff. After trying again and while downloading the 10gb from the slow method, my pc became so slow that I had to shut it down manually. I then put the webui on another drive, but now running the .bat works until "failed to create model quickly; will retry using slow method" and after there is no follow up and my pc is running very slow while having it running. I also tried deleting the venv folder.

Steps to reproduce the problem

  1. set COMMANDLINE_ARGS=--use-directml --medvram --precision full --no-half --no-half-vae --opt-split-attention-v1 --opt-sub-quad-attention --disable-nan-check
  2. run webui-user.bat

What should have happened?

Best case scenario would be the quick method working, but atleast the slow method should start.

What browsers do you use to access the UI ?

Google Chrome

Sysinfo

sysinfo-2024-09-06-13-11.json

Console logs

venv "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\Scripts\Python.exe"
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: 1.10.1
Commit hash: <none>
no module 'xformers'. Processing without...
no module 'xformers'. Processing without...
No module 'xformers'. Proceeding without it.
Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\pytorch_lightning\utilities\distributed.py:258: LightningDeprecationWarning: `pytorch_lightning.utilities.distributed.rank_zero_only` has been deprecated in v1.8.1 and will be removed in v2.0.0. You can import it from `pytorch_lightning.utilities` instead.
  rank_zero_deprecation(
Launching Web UI with arguments: --use-directml --medvram --precision full --no-half --no-half-vae --opt-split-attention-v1 --opt-sub-quad-attention --disable-nan-check
ONNX: version=1.19.2 provider=DmlExecutionProvider, available=['DmlExecutionProvider', 'CPUExecutionProvider']
Loading weights [67ab2fd8ec] from Z:\Programme\stable-diffusion-webui-amdgpu-master\models\Stable-diffusion\ponyDiffusionV6XL_v6StartWithThisOne.safetensors
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Creating model from config: Z:\Programme\stable-diffusion-webui-amdgpu-master\repositories\generative-models\configs\inference\sd_xl_base.yaml
Startup time: 30.2s (prepare environment: 13.8s, initialize shared: 10.5s, other imports: 0.5s, list SD models: 0.4s, load scripts: 1.6s, initialize extra networks: 0.7s, scripts before_ui_callback: 0.1s, create ui: 3.1s, gradio launch: 5.9s).
creating model quickly: OSError
Traceback (most recent call last):
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\utils\_errors.py", line 304, in hf_raise_for_status
    response.raise_for_status()
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\requests\models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/None/resolve/main/config.json

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

Traceback (most recent call last):
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\transformers\utils\hub.py", line 402, in cached_file
    resolved_file = hf_hub_download(
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\utils\_deprecation.py", line 101, in inner_f
    return f(*args, **kwargs)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\file_download.py", line 1240, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\file_download.py", line 1347, in _hf_hub_download_to_cache_dir
    _raise_on_head_call_error(head_call_error, force_download, local_files_only)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\file_download.py", line 1854, in _raise_on_head_call_error
    raise head_call_error
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\file_download.py", line 1751, in _get_metadata_or_catch_error
    metadata = get_hf_file_metadata(
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\file_download.py", line 1673, in get_hf_file_metadata
    r = _request_wrapper(
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\file_download.py", line 376, in _request_wrapper
    response = _request_wrapper(
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\file_download.py", line 400, in _request_wrapper
    hf_raise_for_status(response)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\huggingface_hub\utils\_errors.py", line 352, in hf_raise_for_status
    raise RepositoryNotFoundError(message, response) from e
huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-66db0047-6afd850076870ce136903448;1af45499-26a8-47b1-9621-e6443103fef1)

Repository Not Found for url: https://huggingface.co/None/resolve/main/config.json.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated.
Invalid username or password.

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

Traceback (most recent call last):
  File "C:\Users\Miniwürstchen\AppData\Local\Programs\Python\Python310\lib\threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "C:\Users\Miniwürstchen\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\Miniwürstchen\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\modules\initialize.py", line 149, in load_model
    shared.sd_model  # noqa: B018
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\modules\shared_items.py", line 190, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\modules\sd_models.py", line 693, in get_sd_model
    load_model()
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\modules\sd_models.py", line 831, in load_model
    sd_model = instantiate_from_config(sd_config.model, state_dict)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\modules\sd_models.py", line 775, in instantiate_from_config
    return constructor(**params)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\repositories\generative-models\sgm\models\diffusion.py", line 61, in __init__
    self.conditioner = instantiate_from_config(
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\repositories\generative-models\sgm\util.py", line 175, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\repositories\generative-models\sgm\modules\encoders\modules.py", line 88, in __init__
    embedder = instantiate_from_config(embconfig)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\repositories\generative-models\sgm\util.py", line 175, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\repositories\generative-models\sgm\modules\encoders\modules.py", line 361, in __init__
    self.transformer = CLIPTextModel.from_pretrained(version)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\modules\sd_disable_initialization.py", line 68, in CLIPTextModel_from_pretrained
    res = self.CLIPTextModel_from_pretrained(None, *model_args, config=pretrained_model_name_or_path, state_dict={}, **kwargs)
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\transformers\modeling_utils.py", line 3213, in from_pretrained
    resolved_config_file = cached_file(
  File "Z:\Programme\stable-diffusion-webui-amdgpu-master\venv\lib\site-packages\transformers\utils\hub.py", line 425, in cached_file
    raise EnvironmentError(
OSError: None is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with `huggingface-cli login` or by passing `token=<your_token>`

Failed to create model quickly; will retry using slow method.

Additional information

No response

@lshqqytiger
Copy link
Owner

#533

@lshqqytiger lshqqytiger added duplicate This issue or pull request already exists not amdgpu specific This issue is related to A1111 upstream. labels Sep 6, 2024
@Morpheus-79
Copy link

Had the same problem after upgrading to the latest 'transformers' version. But after downgrading to 'diffusers' version 0.29.2 in combination with 'transformers' version 4.30.2 everything works fine again now.

@optimusprimus77
Copy link
Author

Just tried it but didnt work for me sadly

@Morpheus-79
Copy link

Try a new inital setup with:

(...)
diffusers==0.29.2
(...)
transformers==4.30.2
(...)

... in requirements.txt and requirements_versions.txt . This worked for me.

@enszio
Copy link

enszio commented Sep 13, 2024

@Morpheus-79 Thanks for the tip. This worked for me too.

@PedroStro
Copy link

Try a new inital setup with:

(...) diffusers==0.29.2 (...) transformers==4.30.2 (...)

... in requirements.txt and requirements_versions.txt . This worked for me.

Where exactly do you do this?

@Morpheus-79
Copy link

Morpheus-79 commented Oct 1, 2024

Where exactly do you do this?

You clone the repository to your local hard drive, open the folder where you cloned all the files to, open the requirements.txt inside this folder and change the diffusers==x.xx.x line to diffusers==0.29.2 and the transformers line to transformers==4.30.2 ... then you do the same for the requirements_versions.txt file ... and after that you start everything for the first time.

With this you force the installation and usage of these specific diffusers and transformers versions, which should work well together.

@mxt321321
Copy link

我改了之后依旧没有解决Failed to create model quickly; will retry using slow method.

@rickvalstar
Copy link

See my cross-post here:

TheLastBen/fast-stable-diffusion#2937 (comment)

I think it will solve the issue as it did for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists not amdgpu specific This issue is related to A1111 upstream.
Projects
None yet
Development

No branches or pull requests

7 participants