Mikubill / sd-webui-controlnet

WebUI extension for ControlNet
GNU General Public License v3.0
17.11k stars 1.97k forks source link

[Bug]: Failed downloading url insightface.cn-sh2.ufileos.com/models/buffalo_l.zip #2511

Closed aetherwu closed 10 months ago

aetherwu commented 10 months ago

Is there an existing issue for this?

What happened?

\venv\lib\site-packages\insightface\utils\download.py", line 73, in download_file raise RuntimeError("Failed downloading url %s" % url) RuntimeError: Failed downloading url http://insightface.cn-sh2.ufileos.com/models/buffalo_l.zip

It says 'insightface.cn-sh2.ufileos.com/models/buffalo_l.zip' when it opens in a browser.

Steps to reproduce the problem

Update ControlNet extention to latest (7b731d15) Choose ip-adapter_face_id_plus Hit Generate in WebUI (1.7)

What should have happened?

Normal generation.

Commit where the problem happens

webui: 3b295d10c7 controlnet: 7b731d15

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--autolaunch --api

List of enabled extensions

LDSR | built-in | None |   |   |   Lora | built-in | None |   |   |   ScuNET | built-in | None |   |   |   SwinIR | built-in | None |   |   |   canvas-zoom-and-pan | built-in | None |   |   |   extra-options-section | built-in | None |   |   |   hypertile | built-in | None |   |   |   mobile | built-in | None |   |   |   prompt-bracket-checker | built-in | None |   |   |   OneButtonPrompt | https://github.com/AIrjen/OneButtonPrompt | main | dc626d92 | 2023-08-29 13:42:00 | unknown adetailer | https://github.com/Bing-su/adetailer.git | main | ebd69df3 | 2024-01-10 21:59:28 | latest multidiffusion-upscaler-for-automatic1111 | https://github.com/pkuliyi2015/multidiffusion-upscaler-for-automatic1111.git | main | fbb24736 | 2023-11-01 18:16:31 | latest openOutpaint-webUI-extension | https://github.com/zero01101/openOutpaint-webUI-extension | main | a4a0200f | 2023-09-01 09:12:02 | unknown openpose-editor | https://github.com/fkunn1326/openpose-editor.git | master | c9357715 | 2023-10-11 17:04:20 | latest sd-civitai-browser-plus | https://github.com/BlafKing/sd-civitai-browser-plus.git | main | 630c0350 | 2023-09-15 09:32:11 | unknown sd-dynamic-prompts | https://github.com/adieyal/sd-dynamic-prompts.git | main | 74991820 | 2024-01-16 19:18:51 | latest sd-webui-EasyPhoto | https://github.com/aigc-apps/sd-webui-EasyPhoto | main | da0281b9 | 2024-01-17 14:20:40 | latest sd-webui-agent-scheduler | https://github.com/ArtVentureX/sd-webui-agent-scheduler | main | 39159f2d | 2024-01-03 02:17:12 | latest sd-webui-agentattention | https://github.com/v0xie/sd-webui-agentattention.git | master | 124355da | 2023-12-28 11:32:37 | latest sd-webui-animatediff | https://github.com/continue-revolution/sd-webui-animatediff | master | e9db9f28 | 2024-01-13 07:18:07 | latest sd-webui-aspect-ratio-helper | https://github.com/thomasasfk/sd-webui-aspect-ratio-helper.git | main | 99fcf9b0 | 2023-06-04 23:39:07 | latest sd-webui-controlnet | https://github.com/Mikubill/sd-webui-controlnet | main | 7b731d15 | 2024-01-20 00:42:40 | latest sd-webui-infinite-image-browsing | https://github.com/zanllp/sd-webui-infinite-image-browsing.git | main | 2384fb18 | 2024-01-03 02:52:50 | latest sd-webui-inpaint-anything | https://github.com/Uminosachi/sd-webui-inpaint-anything.git | main | 1c90c702 | 2023-09-13 12:29:23 | unknown sd-webui-lora-block-weight | https://github.com/hako-mikan/sd-webui-lora-block-weight.git | main | 885db951 | 2023-12-18 22:19:10 | latest sd-webui-segment-anything | https://github.com/continue-revolution/sd-webui-segment-anything.git | master | d80220ec | 2023-10-10 16:17:18 | latest sd_delete_button | https://github.com/AlUlkesh/sd_delete_button.git | main | 9df37671 | 2023-09-01 04:07:19 | latest sdwebui-close-confirmation-dialogue | https://github.com/w-e-w/sdwebui-close-confirmation-dialogue.git | main | f7cfa87d | 2023-08-21 12:37:58 | unknown

Console logs

download_path: E:\ai\webui1.6RC\extensions\sd-webui-controlnet\annotator\downloads\insightface\models\buffalo_l
Downloading E:\ai\webui1.6RC\extensions\sd-webui-controlnet\annotator\downloads\insightface\models\buffalo_l.zip from http://insightface.cn-sh2.ufileos.com/models/buffalo_l.zip...
Traceback (most recent call last):
  File "E:\ai\webui1.6RC\venv\lib\site-packages\gradio\routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "E:\ai\webui1.6RC\venv\lib\site-packages\gradio\blocks.py", line 1431, in process_api
    result = await self.call_function(
  File "E:\ai\webui1.6RC\venv\lib\site-packages\gradio\blocks.py", line 1103, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "E:\ai\webui1.6RC\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "E:\ai\webui1.6RC\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 877, in run_sync_in_worker_thread
    return await future
  File "E:\ai\webui1.6RC\venv\lib\site-packages\anyio\_backends\_asyncio.py", line 807, in run
    result = context.run(func, *args)
  File "E:\ai\webui1.6RC\venv\lib\site-packages\gradio\utils.py", line 707, in wrapper
    response = f(*args, **kwargs)
  File "E:\ai\webui1.6RC\extensions\sd-webui-controlnet\scripts\controlnet_ui\controlnet_ui_group.py", line 755, in run_annotator
    result, is_image = preprocessor(
  File "E:\ai\webui1.6RC\extensions\sd-webui-controlnet\scripts\utils.py", line 75, in decorated_func
    return cached_func(*args, **kwargs)
  File "E:\ai\webui1.6RC\extensions\sd-webui-controlnet\scripts\utils.py", line 63, in cached_func
    return func(*args, **kwargs)
  File "E:\ai\webui1.6RC\extensions\sd-webui-controlnet\scripts\global_state.py", line 37, in unified_preprocessor
    return preprocessor_modules[preprocessor_name](*args, **kwargs)
  File "E:\ai\webui1.6RC\extensions\sd-webui-controlnet\scripts\processor.py", line 700, in face_id_plus
    face_embed, _ = g_insight_face_model.run_model(img)
  File "E:\ai\webui1.6RC\extensions\sd-webui-controlnet\scripts\processor.py", line 681, in run_model
    self.load_model()
  File "E:\ai\webui1.6RC\extensions\sd-webui-controlnet\scripts\processor.py", line 673, in load_model
    self.model = FaceAnalysis(
  File "E:\ai\webui1.6RC\venv\lib\site-packages\insightface\app\face_analysis.py", line 27, in __init__
    self.model_dir = ensure_available('models', name, root=root)
  File "E:\ai\webui1.6RC\venv\lib\site-packages\insightface\utils\storage.py", line 30, in ensure_available
    return download(sub_dir, name, force=False, root=root)
  File "E:\ai\webui1.6RC\venv\lib\site-packages\insightface\utils\storage.py", line 19, in download
    download_file(model_url,
  File "E:\ai\webui1.6RC\venv\lib\site-packages\insightface\utils\download.py", line 73, in download_file
    raise RuntimeError("Failed downloading url %s" % url)
RuntimeError: Failed downloading url http://insightface.cn-sh2.ufileos.com/models/buffalo_l.zip

Additional information

No response

huchenlei commented 10 months ago

In this case you need to manually download the required asset. The root cause can be caused by many factors outside the scope of this repo.

aetherwu commented 10 months ago

Thank you. May I ask that where should I put these files to? I've tried to put them to extensions\sd-webui-controlnet\models in zip or extracted.

Or put zips to: extensions\sd-webui-controlnet\annotator\downloads\insightface\models

None of them work.

The alternative files I found were: https://github.com/deepinsight/insightface/releases

I've also notice that its auther mentioned a place '~/.insightface/models/'

but not for our extenstion. (https://github.com/deepinsight/insightface/issues/1896)

huchenlei commented 10 months ago

You want following folder structure: 1705979026691

aetherwu commented 10 months ago

It works now! Thanks!!!