fix: pre commit and clippy lints

This commit is contained in:
drbh 2024-12-12 12:00:08 -05:00
parent db97d979fb
commit 71ed75a21b
2 changed files with 5 additions and 3 deletions

View File

@ -83,7 +83,7 @@ impl ChunksToString for Vec<InputChunk> {
data,
mimetype,
width,
height,
height: _,
frames: _,
})) => {
// TODO: revisit if we should limit video support to v3 - to avoid sending very large base64 strings

View File

@ -244,14 +244,16 @@ class VlmCausalLMBatch(FlashCausalLMBatch):
)
num_bytes = len(video_frame_buf)
bytes_per_frame = num_bytes // chunk.video.frames
# iterate over with a stride the size of a frame
frames = []
for i in range(chunk.video.frames):
frame = video_frame_buf[
i * bytes_per_frame : (i + 1) * bytes_per_frame
]
frame = frame.reshape(chunk.video.height, chunk.video.width, 3)
frame = frame.reshape(
chunk.video.height, chunk.video.width, 3
)
frames.append(frame)
video_frame_buf = np.stack(frames)