From b448b4e85b7292a3b5e9f22c8db32f4e202a2ef3 Mon Sep 17 00:00:00 2001 From: Joshua Lochner Date: Mon, 2 Dec 2024 19:57:59 +0000 Subject: [PATCH] Formatting --- src/models/idefics3/processing_idefics3.js | 4 ++-- tests/processors.test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/models/idefics3/processing_idefics3.js b/src/models/idefics3/processing_idefics3.js index d861034a5..1bec97b32 100644 --- a/src/models/idefics3/processing_idefics3.js +++ b/src/models/idefics3/processing_idefics3.js @@ -11,8 +11,8 @@ import { count } from "../../utils/core.js"; */ function _prompt_split_image(image_seq_len, image_rows, image_cols, fake_token_around_image, image_token, global_img_token) { let text_split_images = ""; - for (let n_h = 0; n_h < image_rows; n_h++) { - for (let n_w = 0; n_w < image_cols; n_w++) { + for (let n_h = 0; n_h < image_rows; ++n_h) { + for (let n_w = 0; n_w < image_cols; ++n_w) { text_split_images += ( fake_token_around_image + `` + diff --git a/tests/processors.test.js b/tests/processors.test.js index c311f07b2..9b92131cf 100644 --- a/tests/processors.test.js +++ b/tests/processors.test.js @@ -701,7 +701,7 @@ describe("Processors", () => { ); compare(pixel_attention_mask.dims, [3, 2, 364, 364]); compare( - pixel_attention_mask.to('float32').mean().item(), + pixel_attention_mask.to("float32").mean().item(), 2 / 3, 0.001, // threshold );