Pull format type setting out of model_type if statement

This commit is contained in:
Brandon Rising 2024-03-17 22:43:43 -04:00 committed by Brandon
parent 28bfc1c935
commit aec567179d

View File

@ -138,7 +138,7 @@ class ModelProbe(object):
model_type = cls.get_model_type_from_folder(model_path) model_type = cls.get_model_type_from_folder(model_path)
else: else:
model_type = cls.get_model_type_from_checkpoint(model_path) model_type = cls.get_model_type_from_checkpoint(model_path)
format_type = ModelFormat.ONNX if model_type == ModelType.ONNX else format_type format_type = ModelFormat.ONNX if model_type == ModelType.ONNX else format_type
probe_class = cls.PROBES[format_type].get(model_type) probe_class = cls.PROBES[format_type].get(model_type)
if not probe_class: if not probe_class: