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

Function half

models/transformer/wan/modules/attention.py:59–60  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

57 b, lq, lk, out_dtype = q.size(0), q.size(1), k.size(1), q.dtype
58
59 def half(x):
60 return x if x.dtype in half_dtypes else x.to(dtype)
61
62 # preprocess query
63 if q_lens is None:

Callers 1

flash_attentionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected