From 8b685bdde3f8bb89a4326bf7c8985e67f39cb80f Mon Sep 17 00:00:00 2001 From: SysVis AI Date: Sun, 28 Dec 2025 20:26:38 +0700 Subject: [PATCH] fix: pass image as array to vision processor --- src/lib/visionService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/visionService.ts b/src/lib/visionService.ts index b718f80..8ab0064 100644 --- a/src/lib/visionService.ts +++ b/src/lib/visionService.ts @@ -91,9 +91,8 @@ export class VisionService { // Task: Detailed Captioning is best for understanding diagrams const text = ''; - console.log('Analyzing image:', { width: image.width, height: image.height, channels: image.channels }); - // Pass image as an array to ensure it's iterable if internal logic expects list - const inputs = await this.processor(image, text); + // Pass image as an array to ensure it's iterable for transformers.js preprocessing + const inputs = await this.processor([image], text); const generatedIds = await this.model.generate({ ...inputs,