We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 319f610 commit 70f5811Copy full SHA for 70f5811
optimum/exporters/openvino/convert.py
@@ -385,6 +385,12 @@ def ts_patched_forward(*args, **kwargs):
385
"A stateless model will be exported instead. It may result in sub-optimal inference performance."
386
"Provide a model that can be converted to OpenVINO without fallback to ONNX conversion path."
387
)
388
+
389
+ if patch_16bit_model:
390
+ from openvino.frontend.pytorch.patch_model import unpatch_model
391
+ unpatch_model(model, "_openvino_module_extension_patch_orig_forward")
392
+ model.to(torch.float32)
393
394
return export_pytorch_via_onnx(
395
model,
396
config,
0 commit comments