Skip to content

QUANTIZE silently ignored for unsupported models; precision support not explicit #755

@Supriya-Krishnamurthi

Description

@Supriya-Krishnamurthi

Description

When QUANTIZE is provided for models that do not support INT8, the script silently ignores the request and generates only default artifacts (FP32/FP16), while still exiting with status 0.

This leads to a misleading success state, as user intent (INT8 artifacts) is not fulfilled.

Steps to Reproduce

export MODELS_PATH=~/models
/download_public_models.sh centerface coco128

Observed Behavior

FP32/FP16 artifacts are generated
No INT8 artifacts
No warning or error
Exit status = success

Expected Behavior

When QUANTIZE is requested but INT8 is not supported:

Fail with a clear error, or
Emit an explicit warning

Root Cause

  • QUANTIZE is only handled in specific model paths (e.g., YOLO)
  • Other models (e.g., centerface, yolox_s) ignore it entirely
  • missing global validation or post-check for INT8 artifact generation

Suggested Fix

Add a post-check to ensure INT8 artifacts exist when QUANTIZE is set:

if [[ -n "$QUANTIZE" && ! -f "$MODEL_DIR/INT8/$MODEL_NAME.xml" ]]; then
echo "INT8 not supported for $MODEL_NAME"
exit 1
fi

Suggested Improvement

Expose supported precisions per model (FP32/FP16/INT8) instead of implicit behavior, e.g.:

MODEL_PRECISIONS["centerface"]="FP32 FP16"
MODEL_PRECISIONS["yolov8n"]="FP32 FP16 INT8"

This would enable validation, clearer UX, and better maintainability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions