Skip to main content
OKN
Associate III
July 22, 2026
Question

Unable to generate .nb (NBG) file from custom YOLOv8n model in ST Edge AI Developer Cloud

  • July 22, 2026
  • 4 replies
  • 36 views

Hello,

I am trying to create a custom AI model and run inference on the NPU of an STM32MP255F.

At the moment, my goal is only to verify the model creation workflow. Therefore, inference accuracy is not important yet.

Environment

 

  • Target device: STM32MP255F
  • Inference engine: NPU
  • Number of training images: 116 (mouse images)

Steps

1. Dataset creation with Roboflow

  • Annotated all images.
  • Resized images to 256x256.
  • Exported the dataset in YOLOv8 format.

2. Training and export with Ultralytics

Training:

yolo detect train data=data.yaml model=yolov8n.pt epochs=100 imgsz=256

Export:

yolo export model=runs/detect/train/weights/best.pt format=onnx imgsz=256 quantize=8 data=coco8

3. Conversion with ST Edge AI Developer Cloud

  • Uploaded the exported model to ST Edge AI Developer Cloud.

  • Selected the platform:

    "STM32 Microprocessors embedding Cortex-A loaded with X-LINUX-AI"

  • Executed Optimize.

However, the following error is displayed and no .nb file is generated:

Error while generating optimized file. Generation does not contain any output.

 

Additional Information

The Model Zoo object detection model can be converted successfully:

stm32ai-modelzoo/object_detection/yolov8n/
yolov8n_256_quant_pc_uf_od_coco-person-st.tflite

ST Edge AI Developer Cloud generates an .nb file from this model without any issue, and the generated .nb file runs correctly on the STM32MP255F NPU.

Question

Is there anything wrong with my workflow?

Is there any requirement or limitation for ONNX models generated by Ultralytics that would prevent ST Edge AI Developer Cloud from generating an .nb file?

Any advice would be appreciated.

Best Regards,

--

okn

4 replies

OKN
OKNAuthor
Associate III
July 23, 2026

Hello

This is new data created by replacing the original dataset.

Like in the original question, this data also fails the `optimize` step when converting to an .nb file in ST AI Developer Cloud.

 

The attached file is a .zip archive containing best_int8.onnx.

 

Best regards,

--

okn

OKN
OKNAuthor
Associate III
July 27, 2026

Hello

 

Using this guide [How to quantize, evaluate, and deploy YOLOv8 and YOLOv5u object detection models for STM32N6  as a reference,

 I used `tflite_quant.py` to quantize the `yolov8n.tflite` file created with Ultralytics ([This tutorial shows how to quantize saved YOLOv8 models])

I was able to convert that model data to a .nb file using ST Edge AI Cloud.

For now, I’ve confirmed that the resulting .nb file can be used on the STM32MP255F’s NPU.

Object detection has not been successful; this may be due to an issue with the images I prepared.
 

Best Regaeds,

--

okn

Visitor
August 20, 2026

Hello OKN,

I'm seeing the exact same error ("Error while generating optimized 
file. Generation does not contain any output.") on a custom 
MobileNetV2 model (PyTorch -> ONNX, opset 12 and 17 both tried) 
targeting STM32MP257F-EV1, while ST Model Zoo models convert fine 
through the same pipeline.

I've posted the details here: 

 

Did the TFLite export + tflite_quant.py workaround you found also 
work for classification models (not just YOLOv8n detection), or is 
this specific to Ultralytics' export path? Trying to figure out if 
this is a general ONNX-export limitation on ST Edge AI Developer 
Cloud, or something specific to YOLO architectures.

Thanks for sharing your findings, it's been very helpful.

Best regards,
Nithin

OKN
OKNAuthor
Associate III
August 21, 2026

Hello, ​@nithin.uppila 

 

I’ve only tried YOLOv8n. I also tried YOLO26n—it worked fine up until the export stage, but I couldn’t convert it to an .nb file. (It’s possible I did something wrong.)

 

In any case, the object detection using YOLOv8n is running smoothly using the NPU.

Best Regards,

--

okn