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 ea1dd93 commit b2e13d2Copy full SHA for b2e13d2
torchvision/io/image.py
@@ -387,7 +387,9 @@ def _load_extra_decoders_once():
387
388
try:
389
import torchvision_extra_decoders
390
- except ImportError as e:
+
391
+ assert hasattr(torchvision_extra_decoders, "expose_extra_decoders")
392
+ except (AssertionError, ImportError) as e:
393
raise RuntimeError("You need to pip install torchvision-extra-decoders blah blah blah") from e
394
395
# This will expose torch.ops.extra_decoders_ns.decode_avif and torch.ops.extra_decoders_ns.decode_heic
0 commit comments