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

Method dequant

lightx2v/utils/quant_utils.py:185–187  ·  view source on GitHub ↗
(self, tensor, scales, zeros)

Source from the content-addressed store, hash-verified

183 return q_tensor
184
185 def dequant(self, tensor, scales, zeros):
186 tensor = (tensor - zeros) * scales
187 return tensor
188
189 def dequant(self, tensor, scales, out_dtype=torch.bfloat16):
190 tensor_f = tensor.to(torch.float32)

Callers 1

quant_dequantMethod · 0.95

Calls 1

toMethod · 0.45

Tested by

no test coverage detected