From b0faa5ca54d7ed02d33981bf3db50ad3b28d8fca Mon Sep 17 00:00:00 2001 From: David Matos Date: Mon, 2 May 2022 18:00:24 +0200 Subject: [PATCH] Disallow `--dynamic` when `--half` is passed (#7669) * disallow dynamic arg when half is given * Update export.py Co-authored-by: David Matos Co-authored-by: Glenn Jocher --- export.py | 1 + 1 file changed, 1 insertion(+) diff --git a/export.py b/export.py index d85705ebd236..7118b0e60bb8 100644 --- a/export.py +++ b/export.py @@ -482,6 +482,7 @@ def run( 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 not dynamic, '--half not compatible with --dynamic, i.e. use either --half or --dynamic but not both' model = attempt_load(weights, map_location=device, inplace=True, fuse=True) # load FP32 model nc, names = model.nc, model.names # number of classes, class names