Package Details: pix2tex-desktop 2.0-1

Git Clone URL: https://aur.archlinux.org/pix2tex-desktop.git (read-only, click to copy)
Package Base: pix2tex-desktop
Description: Using a ViT to convert images of equations into LaTeX code (desktop icon).
Upstream URL: https://github.com/lukas-blecher/LaTeX-OCR
Licenses: MIT
Submitter: ArcanusNEO
Maintainer: ArcanusNEO
Last Packager: ArcanusNEO
Votes: 1
Popularity: 0.002273
First Submitted: 2023-05-06 14:20 (UTC)
Last Updated: 2024-01-25 07:40 (UTC)

Dependencies (1)

Required by (0)

Sources (2)

Latest Comments

ArcanusNEO commented on 2023-05-23 16:15 (UTC)

@bx376 This package only provides a desktop file and an SVG icon. The error you encountered should be reported to python-pix2tex. As far as I know, this error is related to dependency version issues. If you want to resolve it yourself, please refer to this issue and the install_requires section in the source code. Which means, you need to manually downgrading python-x-transformers and python-timm to the correct versions.

bx376 commented on 2023-05-19 02:34 (UTC) (edited on 2023-05-19 02:34 (UTC) by bx376)

Traceback (most recent call last):
  File "/usr/bin/pix2tex", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pix2tex/__main__.py", line 28, in main
    main(arguments)
  File "/usr/lib/python3.11/site-packages/pix2tex/cli.py", line 224, in main
    model = LatexOCR(arguments)
            ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/contextlib.py", line 81, in inner
    return func(*args, **kwds)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pix2tex/cli.py", line 84, in __init__
    self.model.load_state_dict(torch.load(self.args.checkpoint, map_location=self.args.device))
  File "/usr/lib/python3.11/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict
    raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for Model:
        Missing key(s) in state_dict: "decoder.net.token_emb.emb.weight", "decoder.net.attn_layers.layers.0.0.0.weight", "decoder.net.attn_layers.layers.0.0.0.bias", "decoder.net.attn_layers.layers.1.0.0.weight", "decoder.net.attn_layers.layers.1.0.0.bias", "decoder.net.attn_layers.layers.2.0.0.weight", "decoder.net.attn_layers.layers.2.0.0.bias", "decoder.net.attn_layers.layers.2.1.ff.0.proj.weight", "decoder.net.attn_layers.layers.2.1.ff.0.proj.bias", "decoder.net.attn_layers.layers.2.1.ff.3.weight", "decoder.net.attn_layers.layers.2.1.ff.3.bias", "decoder.net.attn_layers.layers.3.0.0.weight", "decoder.net.attn_layers.layers.3.0.0.bias", "decoder.net.attn_layers.layers.4.0.0.weight", "decoder.net.attn_layers.layers.4.0.0.bias", "decoder.net.attn_layers.layers.5.0.0.weight", "decoder.net.attn_layers.layers.5.0.0.bias", "decoder.net.attn_layers.layers.5.1.ff.0.proj.weight", "decoder.net.attn_layers.layers.5.1.ff.0.proj.bias", "decoder.net.attn_layers.layers.5.1.ff.3.weight", "decoder.net.attn_layers.layers.5.1.ff.3.bias", "decoder.net.attn_layers.layers.6.0.0.weight", "decoder.net.attn_layers.layers.6.0.0.bias", "decoder.net.attn_layers.layers.7.0.0.weight", "decoder.net.attn_layers.layers.7.0.0.bias", "decoder.net.attn_layers.layers.8.0.0.weight", "decoder.net.attn_layers.layers.8.0.0.bias", "decoder.net.attn_layers.layers.8.1.ff.0.proj.weight", "decoder.net.attn_layers.layers.8.1.ff.0.proj.bias", "decoder.net.attn_layers.layers.8.1.ff.3.weight", "decoder.net.attn_layers.layers.8.1.ff.3.bias", "decoder.net.attn_layers.layers.9.0.0.weight", "decoder.net.attn_layers.layers.9.0.0.bias", "decoder.net.attn_layers.layers.10.0.0.weight", "decoder.net.attn_layers.layers.10.0.0.bias", "decoder.net.attn_layers.layers.11.0.0.weight", "decoder.net.attn_layers.layers.11.0.0.bias", "decoder.net.attn_layers.layers.11.1.ff.0.proj.weight", "decoder.net.attn_layers.layers.11.1.ff.0.proj.bias", "decoder.net.attn_layers.layers.11.1.ff.3.weight", "decoder.net.attn_layers.layers.11.1.ff.3.bias". 
        Unexpected key(s) in state_dict: "decoder.net.token_emb.weight", "decoder.net.attn_layers.layers.0.0.weight", "decoder.net.attn_layers.layers.0.0.bias", "decoder.net.attn_layers.layers.0.1.to_out.0.bias", "decoder.net.attn_layers.layers.1.0.weight", "decoder.net.attn_layers.layers.1.0.bias", "decoder.net.attn_layers.layers.1.1.to_out.0.bias", "decoder.net.attn_layers.layers.2.0.weight", "decoder.net.attn_layers.layers.2.0.bias", "decoder.net.attn_layers.layers.2.1.net.0.proj.weight", "decoder.net.attn_layers.layers.2.1.net.0.proj.bias", "decoder.net.attn_layers.layers.2.1.net.2.weight", "decoder.net.attn_layers.layers.2.1.net.2.bias", "decoder.net.attn_layers.layers.3.0.weight", "decoder.net.attn_layers.layers.3.0.bias", "decoder.net.attn_layers.layers.3.1.to_out.0.bias", "decoder.net.attn_layers.layers.4.0.weight", "decoder.net.attn_layers.layers.4.0.bias", "decoder.net.attn_layers.layers.4.1.to_out.0.bias", "decoder.net.attn_layers.layers.5.0.weight", "decoder.net.attn_layers.layers.5.0.bias", "decoder.net.attn_layers.layers.5.1.net.0.proj.weight", "decoder.net.attn_layers.layers.5.1.net.0.proj.bias", "decoder.net.attn_layers.layers.5.1.net.2.weight", "decoder.net.attn_layers.layers.5.1.net.2.bias", "decoder.net.attn_layers.layers.6.0.weight", "decoder.net.attn_layers.layers.6.0.bias", "decoder.net.attn_layers.layers.6.1.to_out.0.bias", "decoder.net.attn_layers.layers.7.0.weight", "decoder.net.attn_layers.layers.7.0.bias", "decoder.net.attn_layers.layers.7.1.to_out.0.bias", "decoder.net.attn_layers.layers.8.0.weight", "decoder.net.attn_layers.layers.8.0.bias", "decoder.net.attn_layers.layers.8.1.net.0.proj.weight", "decoder.net.attn_layers.layers.8.1.net.0.proj.bias", "decoder.net.attn_layers.layers.8.1.net.2.weight", "decoder.net.attn_layers.layers.8.1.net.2.bias", "decoder.net.attn_layers.layers.9.0.weight", "decoder.net.attn_layers.layers.9.0.bias", "decoder.net.attn_layers.layers.9.1.to_out.0.bias", "decoder.net.attn_layers.layers.10.0.weight", "decoder.net.attn_layers.layers.10.0.bias", "decoder.net.attn_layers.layers.10.1.to_out.0.bias", "decoder.net.attn_layers.layers.11.0.weight", "decoder.net.attn_layers.layers.11.0.bias", "decoder.net.attn_layers.layers.11.1.net.0.proj.weight", "decoder.net.attn_layers.layers.11.1.net.0.proj.bias", "decoder.net.attn_layers.layers.11.1.net.2.weight", "decoder.net.attn_layers.layers.11.1.net.2.bias".