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

Method quant_dequant

lightx2v/utils/quant_utils.py:195–198  ·  view source on GitHub ↗
(self, tensor, scales, zeros, qmax, qmin)

Source from the content-addressed store, hash-verified

193 return out.to(out_dtype)
194
195 def quant_dequant(self, tensor, scales, zeros, qmax, qmin):
196 tensor = self.quant(tensor, scales, zeros, qmax, qmin)
197 tensor = self.dequant(tensor, scales, zeros)
198 return tensor
199
200
201def quant_naive_inplace(w, dtype):

Callers 1

fake_quant_tensorMethod · 0.45

Calls 2

quantMethod · 0.95
dequantMethod · 0.95

Tested by

no test coverage detected