Skip to content

Commit a96a1e7

Browse files
committed
fix gen_z_image_ids
1 parent 1798ec0 commit a96a1e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rope.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ namespace Rope {
401401
int index = padded_context_len + 1;
402402
auto img_ids = gen_flux_img_ids(h, w, patch_size, bs, axes_dim_num, index);
403403

404-
int img_pad_len = ((-context_len) % seq_multi_of);
404+
int img_pad_len = bound_mod(static_cast<int>(img_ids.size() / bs), seq_multi_of);
405405
if (img_pad_len > 0) {
406406
std::vector<std::vector<float>> img_pad_ids(bs * img_pad_len, std::vector<float>(3, 0.f));
407407
img_ids = concat_ids(img_ids, img_pad_ids, bs);

0 commit comments

Comments
 (0)