From 14e87dc1869164f8a256fceaed5579bc13954363 Mon Sep 17 00:00:00 2001 From: Glenn Jocher Date: Fri, 8 Jul 2022 13:49:20 +0200 Subject: [PATCH] XML export `--half` fix (#8522) Improved error reporting for https://github.com/ultralytics/yolov5/issues/8519 --- export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export.py b/export.py index ec9024484a3d..623844ff3531 100644 --- a/export.py +++ b/export.py @@ -484,7 +484,7 @@ def run( # Load PyTorch model device = select_device(device) if half: - assert device.type != 'cpu' or coreml or xml, '--half only compatible with GPU export, i.e. use --device 0' + assert device.type != 'cpu' or coreml, '--half only compatible with GPU export, i.e. use --device 0' assert not dynamic, '--half not compatible with --dynamic, i.e. use either --half or --dynamic but not both' model = attempt_load(weights, device=device, inplace=True, fuse=True) # load FP32 model nc, names = model.nc, model.names # number of classes, class names