diff --git a/examples/arm/super_resolution_example_vgf/model_export/README.md b/examples/arm/super_resolution_example_vgf/model_export/README.md index 9489327ed1b..fcab77b1af7 100644 --- a/examples/arm/super_resolution_example_vgf/model_export/README.md +++ b/examples/arm/super_resolution_example_vgf/model_export/README.md @@ -51,6 +51,9 @@ The concrete quick-demo commands below use the pinned revision currently cached for `caidas/swin2SR-classical-sr-x2-64`: `cee1c923c6a37361c6e5650b65dcf4be821e5d52`. +If you choose another checkpoint, use a source you trust and weights saved in +safetensors format. Pickle-based weights are not supported. + ### FP export ```bash diff --git a/examples/arm/super_resolution_example_vgf/model_export/common.py b/examples/arm/super_resolution_example_vgf/model_export/common.py index 617d5575402..631fb53165a 100644 --- a/examples/arm/super_resolution_example_vgf/model_export/common.py +++ b/examples/arm/super_resolution_example_vgf/model_export/common.py @@ -277,12 +277,14 @@ def _load_checkpointed_swin2sr( model = Swin2SRForImageSuperResolution.from_pretrained( # nosec B615 checkpoint, local_files_only=local_files_only, + use_safetensors=True, ).eval() else: model = Swin2SRForImageSuperResolution.from_pretrained( # nosec B615 checkpoint, revision=checkpoint_revision, local_files_only=local_files_only, + use_safetensors=True, ).eval() return Swin2SRWrapper(model)