mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-24 00:12:08 +00:00
fix: pre commit and clippy lints
This commit is contained in:
parent
db97d979fb
commit
71ed75a21b
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user