Skip to content

Commit 73b1185

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 28b53a8 commit 73b1185

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

delphi/sparse_coders/custom/gemmascope.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ def from_pretrained(cls, model_name_or_path, position, device):
104104
pt_params = {k: torch.from_numpy(v) for k, v in params.items()}
105105
model = cls(params["W_enc"].shape[0], params["W_enc"].shape[1])
106106
model.load_state_dict(pt_params)
107-
if device == "cuda" or (isinstance(device, torch.device) and device.type == "cuda"):
107+
if device == "cuda" or (
108+
isinstance(device, torch.device) and device.type == "cuda"
109+
):
108110
model.cuda()
109111
return model

0 commit comments

Comments
 (0)