pix2tex 命令行调用失败: 输入应为有效元组 [type=tuple_type, input_value=10, input_type=int]
$ pix2tex equation-einstein.png /usr/local/lib/python3.11/site-packages/albumentations/core/validation.py:87: UserWarning: ShiftScaleRotate is a special case of Affine transform. Please use Affine transform instead. original_init(self, **validated_kwargs) /usr/local/lib/python3.11/site-packages/pix2tex/dataset/transforms.py:7: UserWarning: Argument(s) 'value' are not valid for transform ShiftScaleRotate [alb.ShiftScaleRotate(shift_limit=0, scale_limit=(-.15, 0), rotate_limit=1, border_mode=0, interpolation=3, /usr/local/lib/python3.11/site-packages/pix2tex/dataset/transforms.py:9: UserWarning: Argument(s) 'border_mode, value' are not valid for transform GridDistortion alb.GridDistortion(distort_limit=0.1, border_mode=0, interpolation=3, value=[255, 255, 255], p=.5)], p=.15), Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/albumentations/core/validation.py", line 43, in _validate_parameters config = schema_cls(**{k: v for k, v in full_kwargs.items() if k in param_names}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 253, in __init__ validated_self = self.__pydantic_validator__.validate_python(data, self_instance=self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pydantic_core._pydantic_core.ValidationError: 1 validation error for InitSchema std_range Input should be a valid tuple [type=tuple_type, input_value=10, input_type=int] For further information visit https://errors.pydantic.dev/2.11/v/tuple_type The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/bin/pix2tex", line 33, in <module> sys.exit(load_entry_point('pix2tex==0.1.4', 'console_scripts', 'pix2tex')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pix2tex/__main__.py", line 27, in main from .cli import main File "/usr/local/lib/python3.11/site-packages/pix2tex/cli.py", line 1, in <module> from pix2tex.dataset.transforms import test_transform File "/usr/local/lib/python3.11/site-packages/pix2tex/dataset/transforms.py", line 13, in <module> alb.GaussNoise(10, p=.2), ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/albumentations/core/validation.py", line 78, in custom_init validated_kwargs = cls._validate_parameters( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/albumentations/core/validation.py", line 47, in _validate_parameters raise ValueError(str(e)) from e ValueError: 1 validation error for InitSchema std_range Input should be a valid tuple [type=tuple_type, input_value=10, input_type=int] For further information visit https://errors.pydantic.dev/2.11/v/tuple_type
内容来源: lukas-blecher/LaTeX-OCR