Skip to content

Commit c7cc95c

Browse files
authored
Revert "Fix: videos in LLaVa-OV"
1 parent 86dd76e commit c7cc95c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

docs/LLaVA_OneVision_Tutorials.ipynb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,6 @@
345345
"\n",
346346
"input_ids = tokenizer_image_token(prompt_question, tokenizer, IMAGE_TOKEN_INDEX, return_tensors=\"pt\").unsqueeze(0).to(device)\n",
347347
"image_sizes = [frame.size for frame in video_frames]\n",
348-
"modalities = [\"video\"] * len(video_frames)\n",
349348
"\n",
350349
"# Generate response\n",
351350
"cont = model.generate(\n",
@@ -355,7 +354,7 @@
355354
" do_sample=False,\n",
356355
" temperature=0,\n",
357356
" max_new_tokens=4096,\n",
358-
" modalities=modalities,\n",
357+
" modalities=[\"video\"],\n",
359358
")\n",
360359
"text_outputs = tokenizer.batch_decode(cont, skip_special_tokens=True)\n",
361360
"print(text_outputs[0])"

0 commit comments

Comments
 (0)