KEMBAR78
Internet problem with downloading Models/网络问题无法使用groundingDINO,下载本地模型后依然无法使用 · Issue #138 · continue-revolution/sd-webui-segment-anything · GitHub
Skip to content

Internet problem with downloading Models/网络问题无法使用groundingDINO,下载本地模型后依然无法使用 #138

@Fatal-Eror

Description

@Fatal-Eror

我使用的是windows的秋叶整合包v4.2
我之前做的操作:
1.根据这个视频内容,https://www.bilibili.com/video/BV1Vh411F7Zn/?spm_id_from=333.337.search-card.all.click&vd_source=5fdf8441f38454739cb347f940e766c2 ,先是尝试了不勾选bypass c++ problem的配置,配置完成后点击generate bounding box,会显示time out或者远程主机关闭了链接之类的问题, 在https://huggingface.co/ShilongLiu/GroundingDINO/tree/main 下载两个模型并放置在models\grounding-dino后仍然还是提示网络问题的报错。我的网络也确实可以正常访问抱脸和github。
2.尝试勾选bypass c++problem,并且留了两个模型在文件夹内,点击generate仍然还是会显示同样的报错信息。偶尔有时不报错并开始下载,但下载速度非常慢只有几十k。
目前不太清楚是为什么连接有问题,以及想问下为什么没有直接使用我手动下载的模型开始生成。

I have tried to use this extention with no ticking bypass c++ problem and the ticking one, but i met some problem with downloading the GroundingDINO models from huggingface like the following error info. Even if i tried to manually download the models from "https://huggingface.co/ShilongLiu/GroundingDINO/tree/main", and ticked the bypass c++ problem option, it still could not work.
I dont know why this internet problem happen, and why it still cannot work with downloaded models.

以下是显示远程主机断开连接的报错信息/ This is the error info:

Running GroundingDINO Inference
Initializing GroundingDINO GroundingDINO_SwinT_OGC (694MB)
final text_encoder_type: bert-base-uncased
Traceback (most recent call last):
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connection.py", line 419, in connect
    self.sock = ssl_wrap_socket(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\ssl.py", line 1071, in _create
    self.do_handshake()
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\util\retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\connection.py", line 419, in connect
    self.sock = ssl_wrap_socket(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\ssl.py", line 513, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\ssl.py", line 1071, in _create
    self.do_handshake()
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\ssl.py", line 1342, in do_handshake
    self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\gradio\routes.py", line 422, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\gradio\blocks.py", line 1323, in process_api
    result = await self.call_function(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\gradio\blocks.py", line 1051, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\extensions\sd-webui-segment-anything\scripts\sam.py", line 247, in dino_predict
    boxes_filt, install_success = dino_predict_internal(input_image, dino_model_name, text_prompt, box_threshold)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\extensions\sd-webui-segment-anything\scripts\dino.py", line 173, in dino_predict_internal
    dino_model = load_dino_model(dino_model_name, install_success)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\extensions\sd-webui-segment-anything\scripts\dino.py", line 119, in load_dino_model
    dino = build_model(args)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\extensions\sd-webui-segment-anything\local_groundingdino\models\__init__.py", line 17, in build_model
    model = build_func(args)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\extensions\sd-webui-segment-anything\local_groundingdino\models\GroundingDINO\groundingdino.py", line 362, in build_groundingdino
    model = GroundingDINO(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\extensions\sd-webui-segment-anything\local_groundingdino\models\GroundingDINO\groundingdino.py", line 98, in __init__
    self.bert = get_tokenlizer.get_pretrained_language_model(text_encoder_type)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\extensions\sd-webui-segment-anything\local_groundingdino\util\get_tokenlizer.py", line 25, in get_pretrained_language_model
    return BertModel.from_pretrained(text_encoder_type)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\transformers\modeling_utils.py", line 2137, in from_pretrained
    resolved_archive_file = cached_file(pretrained_model_name_or_path, filename, **cached_file_kwargs)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\transformers\utils\hub.py", line 409, in cached_file
    resolved_file = hf_hub_download(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\huggingface_hub\utils\_validators.py", line 120, in _inner_fn
    return fn(*args, **kwargs)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\huggingface_hub\file_download.py", line 1364, in hf_hub_download
    http_get(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\huggingface_hub\file_download.py", line 505, in http_get
    r = _request_wrapper(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\huggingface_hub\file_download.py", line 442, in _request_wrapper
    return http_backoff(
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\huggingface_hub\utils\_http.py", line 212, in http_backoff
    response = session.request(method=method, url=url, **kwargs)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "D:\Life\WebUI\sd-webui-aki-v4.2\python\lib\site-packages\requests\adapters.py", line 498, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions