I used Derigum AI Hub to compile yolov8n-seg.pt to hef but it gives me this error:
Hi DevPhamPham,
The error occurs because our cloud compiler does not properly handle EMA models yet.
In the meantime please use this script to re-save your checkpoint, and then resubmit your task in the cloud compiler.
import torch
from ultralytics.nn.tasks import torch_safe_load
checkpoint_in = "PATH_TO_YOUR_CHECKPOINT.pt"
checkpoint_out = "PATH_TO_YOUR_NEW_CHECKPOINT_NAME.pt"
model, _ = torch_safe_load(checkpoint_in)
model['model'] = model['ema']
torch.save(model, checkpoint_out)
Thank you for your guidance, but I am still encountering the same error following your instructions.
Hi @DevPhamPham I am sorry to hear that you were not able to compile the model. I have shared my email with you in DM. Can you please share your checkpoint file with us so we can investigate and assist you better?
Thanks !
Hi @DevPhamPham, we were able to successfully compile the model using @lawrence’s hotfix script. I shared the compiled model file with you yesterday via email.
Please let us know if you need help compiling any other models or have any questions!