Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading