Skip to content

Commit 079d7af

Browse files
committed
extra check for qs_dict['shape'] is None
1 parent 4586426 commit 079d7af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitsandbytes/functional.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ def from_dict(cls, qs_dict: Dict[str, Any], device: torch.device) -> 'QuantState
642642
blocksize=qs_dict['blocksize'],
643643
code=qs_dict['quant_map'].to(device),
644644
dtype=getattr(torch, qs_dict['dtype']),
645-
shape=torch.Size(qs_dict['shape']),
645+
shape=torch.Size(qs_dict['shape']) if qs_dict['shape'] is not None else None,
646646
offset=offset,
647647
state2=state2,
648648
)

0 commit comments

Comments
 (0)