mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-13 05:07:08 +08:00
Change config_file path in uniformer and change the ckpts location since this is a standalone extension now
This commit is contained in:
parent
532f36d18e
commit
3f93c1ea9b
@ -14,7 +14,7 @@ class UniformerDetector:
|
|||||||
if not os.path.exists(modelpath):
|
if not os.path.exists(modelpath):
|
||||||
from basicsr.utils.download_util import load_file_from_url
|
from basicsr.utils.download_util import load_file_from_url
|
||||||
load_file_from_url(checkpoint_file, model_dir=annotator_ckpts_path)
|
load_file_from_url(checkpoint_file, model_dir=annotator_ckpts_path)
|
||||||
config_file = os.path.join(os.path.dirname(annotator_ckpts_path).replace("models", "custom_nodes/annotator"), "uniformer", "exp", "upernet_global_small", "config.py")
|
config_file = os.path.join(os.path.dirname(__file__), "exp", "upernet_global_small", "config.py")
|
||||||
self.model = init_segmentor(config_file, modelpath).cuda()
|
self.model = init_segmentor(config_file, modelpath).cuda()
|
||||||
|
|
||||||
def __call__(self, img):
|
def __call__(self, img):
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import cv2
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
annotator_ckpts_path = os.path.join(os.path.dirname(__file__), "../../models/annotators")
|
annotator_ckpts_path = os.path.join(os.path.dirname(__file__), "ckpts")
|
||||||
|
|
||||||
|
|
||||||
def HWC3(x):
|
def HWC3(x):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user