I was able to convert it to blob by converting PyTorch to Onnx and then to .blob
import torch
from ultralytics import YOLO
# Load your YOLO model
model = YOLO('yolov8n.pt')
# Convert PyTorch model to ONNX
dummy_input = torch.randn(1, 3, 640, 640)
torch.onnx.export(model.model, dummy_input, "yolov8n.onnx", verbose=True, opset_version=10) #Changed the #Opset to 10