π Fixed the bug for unexpected keyword
Browse files
src/utils/qwen_inference.py
CHANGED
|
@@ -78,7 +78,7 @@ class Qwen2_5(BaseModel):
|
|
| 78 |
text = self.processor.apply_chat_template(
|
| 79 |
messages, tokenize=False, add_generation_prompt=True
|
| 80 |
)
|
| 81 |
-
image_inputs, video_inputs
|
| 82 |
inputs = self.processor(
|
| 83 |
text=[text],
|
| 84 |
images=image_inputs,
|
|
@@ -86,7 +86,6 @@ class Qwen2_5(BaseModel):
|
|
| 86 |
fps=1.0,
|
| 87 |
padding=True,
|
| 88 |
return_tensors="pt",
|
| 89 |
-
**video_kwargs,
|
| 90 |
)
|
| 91 |
inputs = inputs.to("cuda")
|
| 92 |
return inputs
|
|
|
|
| 78 |
text = self.processor.apply_chat_template(
|
| 79 |
messages, tokenize=False, add_generation_prompt=True
|
| 80 |
)
|
| 81 |
+
image_inputs, video_inputs = process_vision_info(messages)
|
| 82 |
inputs = self.processor(
|
| 83 |
text=[text],
|
| 84 |
images=image_inputs,
|
|
|
|
| 86 |
fps=1.0,
|
| 87 |
padding=True,
|
| 88 |
return_tensors="pt",
|
|
|
|
| 89 |
)
|
| 90 |
inputs = inputs.to("cuda")
|
| 91 |
return inputs
|