Fix CI lint violations
CI / test (push) Failing after 9s

This commit is contained in:
2026-10-01 22:47:09 +08:00
parent b3774e783c
commit c064d15d8a
3 changed files with 9 additions and 4 deletions
+3 -1
View File
@@ -54,7 +54,9 @@ class TinyFrozenBackbone(FrozenBackbone):
ids.append((int.from_bytes(digest, "little") % 256) + 1)
encoded.append(ids or [1])
length = max(len(row) for row in encoded)
input_ids = torch.zeros(len(encoded), length, dtype=torch.long, device=self.patch.weight.device)
input_ids = torch.zeros(
len(encoded), length, dtype=torch.long, device=self.patch.weight.device
)
mask = torch.zeros_like(input_ids, dtype=torch.bool)
for index, row in enumerate(encoded):
input_ids[index, : len(row)] = torch.tensor(row, device=input_ids.device)