Skip to content

Commit

Permalink
Fix: 明示的に外部データを読み込まない状態でロード
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukumijima committed Nov 13, 2024
1 parent d0f1ea9 commit 0705480
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aivmlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.')

Expand Down Expand Up @@ -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.')

Expand Down

0 comments on commit 0705480

Please sign in to comment.