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

Method __init__

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

Source from the content-addressed store, hash-verified

52 scales = max_val / qmax
53 w_q = torch.clamp(torch.round(w / scales), qmin, qmax).to(torch.int8)
54
55 assert torch.isnan(scales).sum() == 0
56 assert torch.isnan(w_q).sum() == 0
57
58 if not comfyui_mode:
59 scales = scales.view(org_w_shape[0], -1)

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected