facebookresearch / facebookresearch/detectron2
UnpicklingError: invalid load key, '\xef'.
- Dominant language
- Python
- Stars
- 34.7k
- Forks
- 7.9k
- PR merge metrics
- No merged PRs in 30d
Description
3 days ago my code was working cloning the repo and using:
```
from detectron2.config import CfgNode as CN
from detectron2.config import get_cfg
from detectron2.utils.visualizer import ColorMode, Visualizer
from detectron2.data import MetadataCatalog
from detectron2.engine import DefaultPredictor
cfg = get_cfg()
add_vit_config(cfg)
cfg.merge_from_file("cascade_dit_base.yml")
cfg.MODEL.WEIGHTS = "publaynet_dit-b_cascade.pth"
predictor = DefaultPredictor(cfg)
```
After the last commit in the repo, gives me this error:
```
---------------------------------------------------------------------------
UnpicklingError Traceback (most recent call last)
[](https://localhost:8080/#) in ()
18
19 # Step 4: define model
---> 20 predictor = DefaultPredictor(cfg)
21
22 def analyze_image(img):
7 frames
[/usr/local/lib/python3.10/dist-packages/torch/serialization.py](https://localhost:8080/#) in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
918 "functionality.")
919
--> 920 magic_number = pickle_module.load(f, **pickle_load_args)
921 if magic_number != MAGIC_NUMBER:
922 raise RuntimeError("Invalid magic number; corrupt file?")
UnpicklingError: invalid load key, '\xef'.
```
"Instructions To Reproduce the Issue and Full Logs";
Clone repo and use cfg in colab
"Your Environment";
Google colab
Contributor guide
Assessment
This issue has not been assessed yet.