Why can't i use yolov8-seg weights downloaded from Roboflow for inference on my PC?

I trained the instance segmentation model on Roboflow and downloaded the weight from that project. But I can not use it to call inference with YOLOv8 Segmentation model in Ultralytics, it gives the following error:

Meanwhile the weight I downloaded from the ultralytics homepage still works. Before that i downloaded Yolov8 detection model weight from Roboflow to detect object successfully.

It seems like Roboflow exports the segmentation model with a slightly different structure or pipeline which is causing some parts of Ultralytics to not recognize it correctly? Or is the error due to some other reason? Please help me!

  • Project Type: Object dSegmentation
  • Operating System & Browser: Linux
  • Project Universe Link or Workspace/Project ID: danger_segmentation-vps6t