mirror of
https://github.com/vndangkhoa/Sys-Arc-Visl.git
synced 2026-04-05 01:17:57 +07:00
fix: wrap image in array for processor batch input
This commit is contained in:
parent
db777363d7
commit
96670cb678
1 changed files with 3 additions and 2 deletions
|
|
@ -95,9 +95,10 @@ export class VisionService {
|
|||
// Construct prompts using the processor's method (required for Florence-2)
|
||||
const prompts = this.processor.construct_prompts(task);
|
||||
|
||||
// Pre-process the image and text inputs (image first, prompts second)
|
||||
// Pre-process the image and text inputs
|
||||
// Processor expects batch input, so wrap single image in array
|
||||
if (!this.processor) throw new Error('Processor is undefined');
|
||||
const inputs = await this.processor(image, prompts);
|
||||
const inputs = await this.processor([image], prompts);
|
||||
|
||||
const generatedIds = await this.model.generate({
|
||||
...inputs,
|
||||
|
|
|
|||
Loading…
Reference in a new issue