File size: 726 Bytes
6fecfbe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import os
import sys
from torchvision.datasets.utils import download_url

path = os.path.join(os.path.dirname(__file__))
comfy_path = os.path.join(path, '..', '..', '..')

sys.path.append(comfy_path)

import folder_paths
model_path = folder_paths.models_dir
ultralytics_bbox_path = os.path.join(model_path, "ultralytics", "bbox")

if not os.path.exists(os.path.join(path, '..', '..', 'skip_download_model')):
    if not os.path.exists(ultralytics_bbox_path):
        os.makedirs(ultralytics_bbox_path)


    if not os.path.exists(os.path.join(ultralytics_bbox_path, "face_yolov8m.pt")):
        download_url("https://huggingface.co/Bingsu/adetailer/resolve/main/face_yolov8m.pt",
                     ultralytics_bbox_path)