Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何在 VLLM 部署后使用 API 直接传递视频进行推理? #742

Open
XyWzzZ opened this issue Feb 8, 2025 · 2 comments
Open

Comments

@XyWzzZ
Copy link

XyWzzZ commented Feb 8, 2025

我在使用 VLLM 部署 Qwen2-VL-72B-Instruct,并尝试通过 API 进行视频推理。目前的 API 调用方式如下:

`openai_api_key = "None"
openai_api_base = "http://xxxxxx/v1"

client = OpenAI(
api_key=openai_api_key,
base_url=openai_api_base,
)

chat_response = client.chat.completions.create(
model="Qwen2-VL-72B-Instruct",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": [
{"type": "video_url", "video_url": {"url": "https://modelscope-open.oss-cn-hangzhou.aliyuncs.com/images/baby.mp4"}},
{"type": "text", "text": "请描述这个视频的具体过程"},
]},
]
)
`
问题
1、目前 API 允许传递 video_url,但是否支持 直接上传视频文件 而不依赖外部 URL?
2、如果不支持,是否有官方推荐的方式来 直接传递本地视频文件 进行推理,而不是手动拆帧?
3、在 VLLM 部署环境下,是否需要特定的配置或参数才能使 API 识别并处理视频输入?
感谢解答!🙏

@948024326
Copy link

同问+1

@gymbeijing
Copy link

gymbeijing commented Feb 10, 2025

你好,可以问下你的Python版本,Pytorch版本和CUDA版本吗?我也正在部署VLLM,但遇到版本不匹配。

python -m xformers.info
WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
PyTorch 2.5.1 with CUDA 1201 (you have 2.5.1+cu121)
Python 3.10.15 (you have 3.10.16)
Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
Memory-efficient attention, SwiGLU, sparse and more won't be available.
Set XFORMERS_MORE_DETAILS=1 for more details

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

No branches or pull requests

3 participants