mirror of
https://github.com/Bing-su/adetailer.git
synced 2026-03-11 00:10:05 +00:00
fix: sync with ultralytics implement
f8e681c2be/ultralytics/models/yolo/model.py (L17)
This commit is contained in:
@@ -40,7 +40,7 @@ def ultralytics_predict(
|
||||
|
||||
|
||||
def apply_classes(model, model_path: str | Path, classes: str):
|
||||
if not classes or not Path(model_path).stem.endswith("world"):
|
||||
if not classes or "-world" not in Path(model_path).stem:
|
||||
return
|
||||
parsed = [c.strip() for c in classes.split(",")]
|
||||
model.set_classes(parsed)
|
||||
|
||||
Reference in New Issue
Block a user