From 32438fcac2128e695a210265d8f2c97124b78f6e Mon Sep 17 00:00:00 2001 From: drbh Date: Mon, 25 Nov 2024 16:40:32 -0500 Subject: [PATCH] fix: adjust video process, reduce to 1 fps and adjust tensor shape --- Dockerfile | 2 +- backends/client/src/lib.rs | 19 +- backends/v3/src/queue.rs | 4 +- proto/v3/generate.proto | 8 +- router/src/validation.rs | 233 ++++++++++-------- .../models/vlm_causal_lm.py | 37 +-- 6 files changed, 171 insertions(+), 132 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0e7d1d38df..11dfb7aad94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins ffmpeg \ libavcodec-dev \ libavfilter-dev \ - libavdevice-dev \ + libavdevice-dev \ libavformat-dev \ libavutil-dev \ libswscale-dev \ diff --git a/backends/client/src/lib.rs b/backends/client/src/lib.rs index 196253fe645..55297c92c6e 100644 --- a/backends/client/src/lib.rs +++ b/backends/client/src/lib.rs @@ -79,14 +79,19 @@ impl ChunksToString for Vec { let encoded = STANDARD.encode(data); output.push_str(&format!("![](data:{};base64,{})", mimetype, encoded)) } - Some(Chunk::Video(video)) => { - let encoded = STANDARD.encode(&video.as_bytes()); - output.push_str(&format!("