Skip to content

Commit dc16980

Browse files
justinchubyCopilot
andcommitted
style(phi4mm): replace ambiguous Unicode in comments for clean lint
Replace the multiplication-sign U+00D7 and arrow U+2192 in NaViT mask comments with ASCII (x, ->) to clear ruff RUF003 warnings, so lintrunner runs warning-free. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Justin Chu <11205048+justinchuby@users.noreply.github.com>
1 parent efde993 commit dc16980

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/mobius/models/phi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ def forward(
495495
pos_w = op.Div(op.Mul(c, p_const), nb_w_div) # (N, 1, P)
496496
# pos_id(r,c) = pos_h * P + pos_w → (N, P, P)
497497
pos_id = op.Add(op.Mul(pos_h, p_const), pos_w)
498-
# Valid patches are the top-left nb_h × nb_w block; others id 0.
498+
# Valid patches are the top-left nb_h x nb_w block; others -> id 0.
499499
valid = op.And(op.Less(r, nb_h), op.Less(c, nb_w)) # (N, P, P)
500500
zero = op.Constant(value_int=0)
501501
pos_id = op.Where(valid, pos_id, zero)
@@ -959,9 +959,9 @@ def forward(
959959
# ── Optional mask crop: drop padded sub-crop rows/cols ────────
960960
# HF (modeling_phi4mm.py:376-382) uses image_attention_mask to crop
961961
# the assembled grid to its useful height/width before adding the
962-
# row separators. The mask is at the pre-AvgPool resolution (H×H);
962+
# row separators. The mask is at the pre-AvgPool resolution (HxH);
963963
# HF samples it stride-2 (``[..., 0::2, 0::2]``) so each value maps
964-
# to one post-AvgPool position (Hp×Hp per crop).
964+
# to one post-AvgPool position (HpxHp per crop).
965965
if image_attention_mask is not None:
966966
# Sub-crop masks: crops 1..B_ → (h*w, H, H)
967967
sub_mask = op.Slice(

0 commit comments

Comments
 (0)