MCPcopy Create free account
hub / github.com/microsoft/TRELLIS.2 / convert_module_to

Function convert_module_to

trellis2/modules/utils.py:37–43  ·  view source on GitHub ↗

Convert primitive modules to the given dtype.

(l, dtype)

Source from the content-addressed store, hash-verified

35
36
37def convert_module_to(l, dtype):
38 """
39 Convert primitive modules to the given dtype.
40 """
41 if isinstance(l, MIX_PRECISION_MODULES):
42 for p in l.parameters():
43 p.data = p.data.to(dtype)
44
45
46def zero_module(module):

Callers

nothing calls this directly

Calls 1

toMethod · 0.45

Tested by

no test coverage detected