Skip to content

You are attempting to use Flash Attention 2.0 with a model not initialized on GPU. #15

Description

@lesca

安装:使用README中指定的安装方式

conda create -n deepseek-ocr python=3.12.9 -y
conda activate deepseek-ocr
pip install -r requirements.txt
# Install Torch First
pip install flash-attn==2.7.3 --no-build-isolation

执行报错:

python start_ocr_webui.py                                                                                                        (deepseek-ocr) 
Using default model path: deepseek-ai/DeepSeek-OCR
To use a custom model path, set the environment variable: DEEPSEEK_OCR_MODEL_PATH
* Running on local URL:  http://0.0.0.0:7860
* To create a public link, set `share=True` in `launch()`.
=== Starting image processing ===
Number of images: 1
Prompt: <|grounding|>Convert the document to markdown.
Loading model from: deepseek-ai/DeepSeek-OCR
You are using a model of type deepseek_vl_v2 to instantiate a model of type DeepseekOCR. This is not supported for all configurations of models and can yield errors.
You are attempting to use Flash Attention 2.0 without specifying a torch dtype. This might lead to unexpected behaviour
You are attempting to use Flash Attention 2.0 with a model not initialized on GPU. Make sure to move the model to GPU after initializing it on CPU with `model.to('cuda')`.
fish: Job 1, 'python start_ocr_webui.py' terminated by signal SIGKILL (Forced quit)

请问这个怎么处理?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions