Update README.md

This commit is contained in:
Hongji Zhu
2024-08-06 18:06:58 +08:00
committed by GitHub
parent 48ad5be297
commit 17d344e17c

View File

@@ -1423,7 +1423,7 @@ model = AutoModel.from_pretrained('openbmb/MiniCPM-V-2_6', trust_remote_code=Tru
model = model.eval().cuda()
tokenizer = AutoTokenizer.from_pretrained('openbmb/MiniCPM-V-2_6', trust_remote_code=True)
MAX_NUM_FRAMES=64
MAX_NUM_FRAMES=64 # if cuda OOM set a smaller number
def encode_video(video_path):
def uniform_sample(l, n):
@@ -1449,6 +1449,7 @@ msgs = [
]
# Set decode params for video
params = {}
params["use_image_id"] = False
params["max_slice_nums"] = 2 # use 1 if cuda OOM and video resolution > 448*448