[Python] Error Running OCR with Qwen2.5-VL in Colab

Discussão em 'Python' iniciado por Stack, Abril 25, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to run the OCR functionality of Qwen2.5-VL by following the tutorial provided in this notebook: OCR Tutorial Notebook

    However, I am encountering an error when attempting to execute the code. Here are the details:

    Steps Taken:

    • I opened the notebook in Google Colab using this link: Colab Notebook
    • I followed the instructions in the notebook to set up the environment and run the OCR example.

    Error Encountered:

    text: <|im_start|>system
    You are a helpful assistant.<|im_end|>
    <|im_start|>user
    Extract the key-value information in the format:{"company": "", "date": "", "address": "", "total": ""}<|vision_start|><|image_pad|><|vision_end|><|im_end|>
    <|im_start|>assistant

    ---------------------------------------------------------------------------
    ValueError Traceback (most recent call last)
    <ipython-input-24-176a5a9fc203> in <cell line: 0>()
    6
    7 ## Use a local HuggingFace model to inference.
    ----> 8 response = inference(image_path, prompt)
    9 display(Markdown(response))

    27 frames
    /usr/local/lib/python3.11/dist-packages/triton/backends/nvidia/driver.py in __call__(self, *args, **kwargs)
    442
    443 def __call__(self, *args, **kwargs):
    --> 444 self.launch(*args, **kwargs)
    445
    446

    ValueError: Pointer argument (at 0) cannot be accessed from Triton (cpu tensor?)


    [​IMG]

    Additional Information:

    Environment : Google Colab

    Python Version : Default Colab version

    Google Colab: https://colab.research.google.com/drive/1JR1Abv9ORIQZWcjm5-xdFM4zJo6hdp51?usp=sharing

    Continue reading...

Compartilhe esta Página