LLaVA-v1.5-7B fails to parse images and returns no valid response in Gradio UI on Windows+RTX 5060
Describe the issue
deployed the LLaVA project on Windows 11 (NVIDIA GeForce RTX 5060 Laptop GPU with 8GB VRAM) with the following steps:
- Cloned the official repository:
git clone https://github.com/haotian-liu/LLaVA.git; - Created and activated a Conda environment (Python 3.10, PyTorch 2.1.0+cu118);
- Started components as per official docs: first launched the controller (
python -m llava.serve.controller), then the Gradio Web server (python -m llava.serve.gradio_web_server --controller-url http://localhost:21001), and finally the Model Worker (python -m llava.serve.model_worker --controller http://localhost:21001 --model-path liuhaotian/llava-v1.5-7b --device cuda); - All components started without errors, the Worker successfully registered the
llava-v1.5-7bmodel, and the Gradio UI is accessible normally.
Core Problem: After uploading an image and entering a question (e.g., "What is in this image?") in the Gradio UI, clicking the submit button only shows a loading state, and no valid answer is returned (or prompts "Caught Unknown Error"/"Network Error"). I have tried the following solutions but none worked:
- Modified
gradio_web_server.pyto disable streaming output; - Replaced the
worker_generate_streamAPI withworker_generate; - Adjusted VRAM-related parameters (e.g., batch size, precision).
Suspected Root Cause: After troubleshooting, it is suspected that the streaming output mechanism of the LLaVA Gradio UI is incompatible with the underlying asynchronous communication logic of Windows, resulting in the model inference results failing to be returned to the front-end interface normally.
Environment Information:
- OS: Windows 11 Pro
- GPU: NVIDIA GeForce RTX 5060 Laptop GPU (8GB VRAM)
- CUDA Version: 11.8
- PyTorch Version: 2.1.0+cu118
- LLaVA Version: Latest main branch
- Model: liuhaotian/llava-v1.5-7b (fully downloaded locally)
Request:
- Please confirm whether it is a compatibility issue between streaming output and the Windows system;
- If it is indeed this issue, hope to get a targeted fix (such as code modification, environment configuration adjustment, etc.);
- If the compatibility issue of the Gradio UI cannot be fixed, hope to get clear alternative usage solutions that do not rely on Gradio (such as CLI invocation, other lightweight interfaces, etc.).
Source: haotian-liu/LLaVA