From 9b3f29c73c3b96deeac93bf93f555ce99737da96 Mon Sep 17 00:00:00 2001 From: Ilyas Moutawwakil <57442720+IlyasMoutawwakil@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:22:49 +0100 Subject: [PATCH] Update optimum/exporters/utils.py --- optimum/exporters/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimum/exporters/utils.py b/optimum/exporters/utils.py index 59e053ee444..d386c09b7d8 100644 --- a/optimum/exporters/utils.py +++ b/optimum/exporters/utils.py @@ -690,7 +690,7 @@ def check_dummy_inputs_are_allowed( The model input names. """ - forward = model.forward if is_torch_available() and isinstance(model, nn.Module) else model.call + forward = model.forward if is_torch_available() and isinstance(model, torch.nn.Module) else model.call forward_parameters = signature(forward).parameters forward_inputs_set = set(forward_parameters.keys()) dummy_input_names = set(dummy_input_names)