-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
记录一下解决minicpm-o-2.6的running的bug #732
Comments
从实践中,需要添加如下 code 才能跑通: torch.manual_seed(100) model = AutoModel.from_pretrained('openbmb/MiniCPM-o-2_6', trust_remote_code=True, |
感谢分享,我们更新一下 github 的示例代码,huggingface 的代码会完整一些 |
vllm运行minicpm-o-2.6的demo有吗,我按照readme的方式部署了下,调用的时候各种报错,按照文档的格式调不通 |
在2.6上是正常的,但是在哦-.6提示"object": "error", 限于篇幅图像的base64部分我只贴了一部分 |
我们更新了 vllm 的 minicpmo 分支,请拉取最新代码再次尝试,以及可以参考 #742 |
例如,以为了跑通以下readme里面的 Multimodal Live Streaming 章节给出的code,如果我们直接使用如下这段code肯定是跑不通的:
`import math
import numpy as np
from PIL import Image
from moviepy.editor import VideoFileClip
import tempfile
import librosa
import soundfile as sf
def get_video_chunk_content(video_path, flatten=True):
video = VideoFileClip(video_path)
print('video_duration:', video.duration)
video_path="/path/to/video"
sys_msg = model.get_sys_prompt(mode='omni', language='en')
contents = get_video_chunk_content(video_path)
msg = {"role":"user", "content": contents}
msgs = [sys_msg, msg]
generate_audio = True
output_audio_path = 'output.wav'
res = model.chat(
msgs=msgs,
tokenizer=tokenizer,
sampling=True,
temperature=0.5,
max_new_tokens=4096,
omni_input=True, # please set omni_input=True when omni inference
use_tts_template=True,
generate_audio=generate_audio,
output_audio_path=output_audio_path,
max_slice_nums=1,
use_image_id=False,
return_dict=True
)
print(res)`
The text was updated successfully, but these errors were encountered: