mirror of
https://github.com/vndangkhoa/Sys-Arc-Visl.git
synced 2026-04-05 01:17:57 +07:00
fix: pass image as array to vision processor
This commit is contained in:
parent
f4ab8371f6
commit
8b685bdde3
1 changed files with 2 additions and 3 deletions
|
|
@ -91,9 +91,8 @@ export class VisionService {
|
|||
|
||||
// Task: Detailed Captioning is best for understanding diagrams
|
||||
const text = '<MORE_DETAILED_CAPTION>';
|
||||
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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue