mirror of
https://github.com/vndangkhoa/Sys-Arc-Visl.git
synced 2026-04-05 01:17:57 +07:00
fix: use object args for vision processor
This commit is contained in:
parent
023cc3264c
commit
cc74967a54
1 changed files with 4 additions and 2 deletions
|
|
@ -91,8 +91,10 @@ export class VisionService {
|
|||
|
||||
// Task: Detailed Captioning is best for understanding diagrams
|
||||
const text = '<MORE_DETAILED_CAPTION>';
|
||||
// Pass image as an array to ensure it's iterable for transformers.js preprocessing
|
||||
const inputs = await this.processor([image], text);
|
||||
// Pass arguments as object to avoid positional ambiguity
|
||||
// Florence-2 processor typically expects 'images' and 'text'
|
||||
if (!this.processor) throw new Error('Processor is undefined');
|
||||
const inputs = await this.processor({ text, images: [image] });
|
||||
|
||||
const generatedIds = await this.model.generate({
|
||||
...inputs,
|
||||
|
|
|
|||
Loading…
Reference in a new issue