LiveCC Vision Language Model Utils - PyTorch
Project description
livecc-utils
LiveCC Utils is a supplement to qwen-vl-utils, which contains a set of helper functions for processing and integrating visual language information with LiveCC Model.
Install
pip install qwen-vl-utils livecc-utils
Feature
Decord Video Reader Plus
Compared to _read_video_decord in qwen-vl-utils, we provide _read_video_decord_plus that can handle video with video_start, video_end, and support both smart nframe and strict fps. Please refer to src/livecc_utils/video_process_patch.py
Usage
Easy. Just put the import of livecc-utils before qwen_vl_utils.
import livecc_utils
from qwen_vl_utils import ...
Easy KV Cache for Multi-turn
Original Qwen2VL has some bugs during multi-turn conversation with past_key_values. We provide a patch prepare_multiturn_multimodal_inputs_for_generation at src/livecc_utils/generation_patch.py. During inference, using model.prepare_inputs_for_generation = functools.partial(prepare_multiturn_multimodal_inputs_for_generation, model) then do faster inference with past_key_values!
Usage
Easy. Just let model.prepare_inputs_for_generation = functools.partial(prepare_multiturn_multimodal_inputs_for_generation, model).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file livecc_utils-0.0.2.tar.gz.
File metadata
- Download URL: livecc_utils-0.0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb98ee173948276d1f55b1ea6793bc5b5ffb027a3d84875b2c634887073b76cb
|
|
| MD5 |
57ddb1c541a0b4f7adcd42be57ba448a
|
|
| BLAKE2b-256 |
caa089c5c92bd3a825905304f66afdc60867e3c452b2061383822c38d1af54fd
|
File details
Details for the file livecc_utils-0.0.2-py3-none-any.whl.
File metadata
- Download URL: livecc_utils-0.0.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9fc0d1e28b45778dc79d5aad4603e3e4d06572c6a778b98f6091eb363a61233
|
|
| MD5 |
e43c49c3fe1286706407f0c82ed28d26
|
|
| BLAKE2b-256 |
d2bf4e8d0eb15c6b1d34ae0cc2eb1444f66776506b8d80d223a0e5d6dcd02f80
|