MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / half

Function half

models/transformer/wan/modules/tm2m_model.py:65–66  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

63 b, lq, lk, out_dtype = q.size(0), q.size(1), k.size(1), q.dtype
64
65 def half(x):
66 return x if x.dtype in half_dtypes else x.to(dtype)
67
68 # preprocess query
69 if q_lens is None:

Callers 1

flash_attentionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected