Skip to content

Fix Web Demo dependencies and runtime crashes#1977

Open
study8677 wants to merge 3 commits intoQwenLM:mainfrom
study8677:main
Open

Fix Web Demo dependencies and runtime crashes#1977
study8677 wants to merge 3 commits intoQwenLM:mainfrom
study8677:main

Conversation

@study8677
Copy link

Description

📝 Change Summary

This PR fixes several critical issues in web_demo_mm.py that caused the Web Demo to fail during startup and inference.
After these changes, the Web Demo can reliably launch and correctly handle multimodal inference workflows.

🛠️ Fix Details

  1. Add missing dependency

    • Added qwen-vl-utils==0.0.14 to requirements_web_demo.txt.
    • Reason: Qwen3-VL multimodal processing (especially with the vLLM backend) has a hard dependency on this package. Missing it leads to an ImportError at runtime.
  2. Fix crash when uploading files

    • Updated the _parse_text function to properly handle and convert input types.
    • Reason: Gradio passes uploaded files as tuples. The previous implementation assumed a string input and called .split() directly, causing
      AttributeError: 'tuple' object has no attribute 'split'.
  3. Fix vLLM inference input format

    • Wrapped the inputs dictionary as a list ([inputs]) when calling model.generate.
    • Reason: vllm requires inputs to be provided as a list. Passing a dictionary directly causes vLLM to incorrectly iterate over keys, leading to malformed inputs and failed generation.

google-labs-jules bot and others added 3 commits January 6, 2026 05:54
- Add `qwen-vl-utils==0.0.14` to `requirements_web_demo.txt`.
- Fix crash in `_parse_text` when input is not a string (e.g. file path tuple).
- Fix vLLM generation call to pass inputs as a list to avoid iterating over dictionary keys.
- 在 `requirements_web_demo.txt` 中添加 `qwen-vl-utils==0.0.14`。
- 修复 `_parse_text` 在输入非字符串(如文件路径元组)时的崩溃问题。
- 修复 vLLM 后端调用 `model.generate` 时未将输入包装为列表的问题。
…4791253137052509546

Fix web demo dependencies and crashes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant