赞
踩
完整报错内容:
'HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /Bingsu/yolo-world-mirror/resolve/main/yolov8x-worldv2.pt (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000002079874DFC0>, 'Connection to huggingface.co timed out. (connect timeout=10)'))' thrown while requesting HEAD https://huggingface.co/Bingsu/yolo-world-mirror/resolve/main/yolov8x-worldv2.pt
WARNING:huggingface_hub.utils._http:'HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /Bingsu/yolo-world-mirror/resolve/main/yolov8x-worldv2.pt (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x000002079874DFC0>, 'Connection to huggingface.co timed out. (connect timeout=10)'))' thrown while requesting HEAD https://huggingface.co/Bingsu/yolo-world-mirror/resolve/main/yolov8x-worldv2.pt
[-] ADetailer: Failed to load model 'yolov8x-worldv2.pt' from huggingface
[-] ADetailer initialized. version: 24.4.2, num models: 9
在源代码中,引用 yolo 相关文件的时候,大部分都采用了从云端下载的方法,但是,huggingface已经被墙了
所以说,下载不到很正常。
你得会魔法,但是不是人人都会魔法,所以,我开了个下载链接:
链接:https://pan.baidu.com/s/12M0R4nB1gZ6ZC5A5H4VjDQ?pwd=9ydw
提取码:9ydw
2.1
把 yolov8x-worldv2.pt 文件找个合适的目录扔进去
我把它扔在 model 目录下面(请务必记住这个目录):
S:\app_AI\stableDiffusion-webui-aki\sd-webui-aki-v4.8\models\yolo_world_mirror
2.2
找到这个路径 (请参考我下面的路径,找到你自己的 common.py 文件!):
S:\app_AI\stableDiffusion-webui-aki\sd-webui-aki-v4.8\extensions\adetailer\adetailer\common.py
2.3
使用 IDE 打开 common.py 文件,找到下面的代码:
注释掉这个 get_models() 函数(主要是怕改崩溃了,留个备份)
2.4
重写一个新的 get_models() 函数
请一定要注意,在下面这个 get_models 函数中,这一行:
local_model_dir = “S:/app_AI/stableDiffusion-webui-aki/sd-webui-aki-v4.8/models/yolo_world_mirror”
!!!请把上面这个 local_model_dir 的路径,换成你刚才把 yolov8x-worldv2.pt 文件扔在的那个文件夹!!!我写的是我的路径,你要写你的路径
def get_models(
*dirs: str | os.PathLike[str], huggingface: bool = True
) -> OrderedDict[str, str]:
model_paths = []
for dir_ in dirs:
if not dir_:
continue
model_paths.extend(scan_model_dir(Path(dir_)))
models = OrderedDict()
def get_model_file(file: str, local_dir: str) -> str:
local_file_path = os.path.join(local_dir, file)
if os.path.exists(local_file_path):
print(f"Using local model file: {local_file_path}")
return local_file_path
else:
return hf_download(file)
if huggingface:
local_model_dir = "S:/app_AI/stableDiffusion-webui-aki/sd-webui-aki-v4.8/models/yolo_world_mirror"
models.update(
{
"face_yolov8n.pt": hf_download("face_yolov8n.pt"),
"face_yolov8s.pt": hf_download("face_yolov8s.pt"),
"hand_yolov8n.pt": hf_download("hand_yolov8n.pt"),
"person_yolov8n-seg.pt": hf_download("person_yolov8n-seg.pt"),
"person_yolov8s-seg.pt": hf_download("person_yolov8s-seg.pt"),
"yolov8x-worldv2.pt": get_model_file("yolov8x-worldv2.pt", local_model_dir),
}
)
models.update(
{
"mediapipe_face_full": "mediapipe_face_full",
"mediapipe_face_short": "mediapipe_face_short",
"mediapipe_face_mesh": "mediapipe_face_mesh",
"mediapipe_face_mesh_eyes_only": "mediapipe_face_mesh_eyes_only",
}
)
invalid_keys = [k for k, v in models.items() if v == "INVALID"]
for key in invalid_keys:
models.pop(key)
for path in model_paths:
if path.name in models:
continue
models[path.name] = str(path)
return models
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。