Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
xenova committed Dec 2, 2024
1 parent f88500c commit b448b4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/models/idefics3/processing_idefics3.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 +
`<row_${n_h + 1}_col_${n_w + 1}>` +
Expand Down
2 changes: 1 addition & 1 deletion tests/processors.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down

0 comments on commit b448b4e

Please sign in to comment.