From c81a73e4790acc02b97ce653f406e06713ba1e05 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sat, 9 Sep 2023 14:15:57 +0900 Subject: [PATCH 1/2] improve: add skip_download_model --- impact/subpack_nodes.py | 2 +- install.py | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/impact/subpack_nodes.py b/impact/subpack_nodes.py index 4401747..9742839 100644 --- a/impact/subpack_nodes.py +++ b/impact/subpack_nodes.py @@ -3,7 +3,7 @@ import folder_paths import impact.core as core import impact.subcore as subcore -print(f"### Loading: ComfyUI-Impact-Pack (Subpack: V0.2.1)") +print(f"### Loading: ComfyUI-Impact-Pack (Subpack: V0.2.2)") model_path = folder_paths.models_dir folder_paths.folder_names_and_paths["ultralytics_bbox"] = ([os.path.join(model_path, "ultralytics", "bbox")], folder_paths.supported_pt_extensions) diff --git a/install.py b/install.py index 19ae9f6..9145fbe 100644 --- a/install.py +++ b/install.py @@ -12,20 +12,21 @@ model_path = folder_paths.models_dir ultralytics_bbox_path = os.path.join(model_path, "ultralytics", "bbox") ultralytics_segm_path = os.path.join(model_path, "ultralytics", "segm") -if not os.path.exists(ultralytics_bbox_path): - os.makedirs(ultralytics_bbox_path) +if not os.path.exists(os.path.join(subpack_path, '..', '..', 'skip_download_model')): + if not os.path.exists(ultralytics_bbox_path): + os.makedirs(ultralytics_bbox_path) -if not os.path.exists(ultralytics_segm_path): - os.makedirs(ultralytics_segm_path) + if not os.path.exists(ultralytics_segm_path): + os.makedirs(ultralytics_segm_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) + 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) -if not os.path.exists(os.path.join(ultralytics_bbox_path, "hand_yolov8s.pt")): - download_url("https://huggingface.co/Bingsu/adetailer/resolve/main/hand_yolov8s.pt", - ultralytics_bbox_path) + if not os.path.exists(os.path.join(ultralytics_bbox_path, "hand_yolov8s.pt")): + download_url("https://huggingface.co/Bingsu/adetailer/resolve/main/hand_yolov8s.pt", + ultralytics_bbox_path) -if not os.path.exists(os.path.join(ultralytics_segm_path, "person_yolov8m-seg.pt")): - download_url("https://huggingface.co/Bingsu/adetailer/resolve/main/person_yolov8m-seg.pt", - ultralytics_segm_path) + if not os.path.exists(os.path.join(ultralytics_segm_path, "person_yolov8m-seg.pt")): + download_url("https://huggingface.co/Bingsu/adetailer/resolve/main/person_yolov8m-seg.pt", + ultralytics_segm_path) From 05f1fbc68e60e36abe6e0d72473ddc9b2eabf6c3 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Thu, 14 Sep 2023 19:02:09 +0900 Subject: [PATCH 2/2] skip ultralyticis 8.0.177 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c6856f7..8d0a784 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -ultralytics \ No newline at end of file +ultralytics!=8.0.177 \ No newline at end of file