From 0705480c04d38eb1fc54a75ee0a5ab893fe4fd0e Mon Sep 17 00:00:00 2001 From: tsukumi Date: Wed, 13 Nov 2024 14:08:43 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E6=98=8E=E7=A4=BA=E7=9A=84=E3=81=AB?= =?UTF-8?q?=E5=A4=96=E9=83=A8=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92=E8=AA=AD?= =?UTF-8?q?=E3=81=BF=E8=BE=BC=E3=81=BE=E3=81=AA=E3=81=84=E7=8A=B6=E6=85=8B?= =?UTF-8?q?=E3=81=A7=E3=83=AD=E3=83=BC=E3=83=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aivmlib/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aivmlib/__init__.py b/aivmlib/__init__.py index 9a47c79..d0c4e6f 100755 --- a/aivmlib/__init__.py +++ b/aivmlib/__init__.py @@ -229,7 +229,7 @@ def read_aivmx_metadata(aivmx_file: BinaryIO) -> AivmMetadata: # ONNX モデル (Protobuf) をロード try: - model = onnx.load_model(aivmx_file, format='protobuf') + model = onnx.load_model(aivmx_file, format='protobuf', load_external_data=False) except DecodeError: raise AivmValidationError('Failed to decode AIVM metadata. This file is not an AIVMX (ONNX) file.') @@ -342,7 +342,7 @@ def write_aivmx_metadata(aivmx_file: BinaryIO, aivm_metadata: AivmMetadata) -> b # ONNX モデル (Protobuf) をロード try: - model = onnx.load_model(aivmx_file, format='protobuf') + model = onnx.load_model(aivmx_file, format='protobuf', load_external_data=False) except DecodeError: raise AivmValidationError('Failed to decode AIVM metadata. This file is not an AIVMX (ONNX) file.')