Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow YOLO models in same directory #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions impact/subpack_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def INPUT_TYPES(s):

def doit(self, model_name):
model_path = folder_paths.get_full_path("ultralytics", model_name)
if model_path is None and (model_name.startswith("bbox/") or model_name.startswith("segm/")): # Allow segm/bbox models to be located in the same folder for shared model storage with other UIs
model_path = folder_paths.get_full_path("ultralytics", model_name[5:])
model = subcore.load_yolo(model_path)

if model_name.startswith("bbox"):
Expand Down