MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / __init__

Method __init__

tools/convert/quant/quant.py:27–29  ·  view source on GitHub ↗
(self, weight)

Source from the content-addressed store, hash-verified

25
26
27class QuantTemplate(metaclass=ABCMeta):
28 def __init__(self, weight):
29 if weight.dim() != 2:
30 raise ValueError(f"Only 2D tensors supported. Got {weight.dim()}D tensor")
31 if torch.isnan(weight).any():
32 raise ValueError("Tensor contains NaN values")

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected