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

add new feature for llava-next-video #417

Closed
wants to merge 19 commits into from
Closed

add new feature for llava-next-video #417

wants to merge 19 commits into from

Conversation

ZhangYuanhan-AI
Copy link
Contributor

from io import BytesIO
from json import dumps

import cv2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opencv-python should be added in pyproject.toml.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many user-defined paths and some parameters in argparse are not being used.

README.md Outdated
@@ -1,411 +1,74 @@
To refine and clean up the README you've provided for the SGLang project, I'll focus on improving clarity, organization, and conciseness. This includes providing clear installation instructions, simplifying steps where possible, and ensuring the document is easy to navigate. Here's a revised version:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert the change to README.md

@@ -20,7 +20,7 @@ dependencies = [

[project.optional-dependencies]
srt = ["aiohttp", "fastapi", "psutil", "rpyc", "torch", "uvloop", "uvicorn",
"zmq", "vllm>=0.3.3", "interegular", "pydantic", "pillow", "outlines>=0.0.27"]
"zmq", "vllm==0.3.3", "interegular", "pydantic", "pillow", "outlines>=0.0.27"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recently, we moved to vllm==0.4.2, can you update accordingly?
There are only minor changes. You can change similar to the changes in this PR #380

@@ -0,0 +1,198 @@
# from flask import Flask, request, jsonify
Copy link
Contributor

@merrymercy merrymercy May 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename examples/demo to examples/usage/llava_video

compile_and_cleanup_final_results(cur_chunk, num_batches, save_dir)


import argparse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to the beginning of the file.

parser.add_argument('--chunk-idx', type=int, default=0, help='The index of the chunk to process.')
parser.add_argument('--num-chunks', type=int, default=8, help='The number of chunks to process.')
parser.add_argument('--save-dir', type=str, default="./work_dirs/llava_video", help='The directory to save the processed video files.')
parser.add_argument('--video-dir', type=str, default="/mnt/bn/vl-research/workspace/yhzhang/data/sora/", help='The directory to save the processed video files.')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there are many personal paths. Can someone else easily run this script?
Maybe you can move all things under a single folder examples/llava_video and add a README.md with an example command that runs on your Q98Z4OTh8RwmDonc.mp4

return video_base64


# def encode_video_base64(video_path):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unused code.

@@ -32,6 +32,9 @@
)
from vllm.logger import _default_handler as vllm_default_handler

from typing import Any, Dict, List, Optional, Tuple, Union
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge this with L7

@ZhangYuanhan-AI ZhangYuanhan-AI deleted the llava_video branch May 12, 2024 05:57
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.

4 participants