fix linting
This commit is contained in:
parent
9d7f694438
commit
0417104397
1 changed files with 3 additions and 5 deletions
|
@ -302,11 +302,9 @@ class GGUFWriter:
|
||||||
tensor_shape = quant_shape_from_byte_shape(tensor_shape, raw_dtype)
|
tensor_shape = quant_shape_from_byte_shape(tensor_shape, raw_dtype)
|
||||||
|
|
||||||
# split when over tensor limit
|
# split when over tensor limit
|
||||||
if (self.split_max_tensors != 0 and \
|
if (self.split_max_tensors != 0 and len(self.tensors[-1]) >= self.split_max_tensors \
|
||||||
len(self.tensors[-1]) >= self.split_max_tensors \
|
# or split when over size limit
|
||||||
# or split when over size limit
|
or self.split_max_size != 0 and sum(ti.nbytes for ti in self.tensors[-1].values()) + tensor_nbytes > self.split_max_size):
|
||||||
or self.split_max_size != 0 and \
|
|
||||||
sum(ti.nbytes for ti in self.tensors[-1].values()) + tensor_nbytes > self.split_max_size):
|
|
||||||
|
|
||||||
self.tensors.append(dict())
|
self.tensors.append(dict())
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue