-
Notifications
You must be signed in to change notification settings - Fork 362
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_pickle.UnpicklingError: invalid load key, 'v'. 错误 #90
Comments
模型下载不完整,请检查模型文件大小和网页上是否一致,如果大小一致,可以进一步通过sha256确认是否下载完整。 |
重新删除 下载还是有这个问题,能告知是哪个模型出错呢 |
通过文件大小比对一下呢?大小不一致的就是有问题的 |
可以下载了,下载下来有点大啊,磁盘都装不下了,模型有多大呢,是必须全不下载还是可以选择一部分模型呢 |
约6GB,需要全部下载 |
你看看你下载的这个模型多大,可能没下载完整 |
下完整了,后面发现是内存不够加载模型报的错误信息 |
如果只想使用cpu,不使用gpu,需要怎么操作呢 |
参考这个文档:https://github.com/opendatalab/PDF-Extract-Kit/blob/main/docs/Install_in_Windows_zh_cn.md#3修改config-使用cpu推理 |
好的,十分感谢 |
root@ca9782e90bf9:/home/pdf/PDF-Extract-Kit# python pdf_extract.py --pdf /home/pdf/test.pdf
Namespace(pdf='/home/pdf/test.pdf', output='output', vis=False, render=False)
2024-08-15 17:08:10
Started!
Traceback (most recent call last):
File "/home/pdf/PDF-Extract-Kit/pdf_extract.py", line 98, in
mfd_model = mfd_model_init(model_configs['model_args']['mfd_weight'])
File "/home/pdf/PDF-Extract-Kit/pdf_extract.py", line 31, in mfd_model_init
mfd_model = YOLO(weight)
File "/usr/local/lib/python3.10/site-packages/ultralytics/models/yolo/model.py", line 23, in init
super().init(model=model, task=task, verbose=verbose)
File "/usr/local/lib/python3.10/site-packages/ultralytics/engine/model.py", line 142, in init
self._load(model, task=task)
File "/usr/local/lib/python3.10/site-packages/ultralytics/engine/model.py", line 294, in _load
self.model, self.ckpt = attempt_load_one_weight(weights)
File "/usr/local/lib/python3.10/site-packages/ultralytics/nn/tasks.py", line 855, in attempt_load_one_weight
ckpt, weight = torch_safe_load(weight) # load ckpt
File "/usr/local/lib/python3.10/site-packages/ultralytics/nn/tasks.py", line 781, in torch_safe_load
ckpt = torch.load(file, map_location="cpu")
File "/usr/local/lib/python3.10/site-packages/ultralytics/utils/patches.py", line 86, in torch_load
return _torch_load(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/torch/serialization.py", line 1040, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/usr/local/lib/python3.10/site-packages/torch/serialization.py", line 1262, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
执行命令报错,什么原因呢
The text was updated successfully, but these errors were encountered: