MCPcopy Create free account
hub / github.com/TencentARC/AnimeGamer / zero_module

Function zero_module

VDM_Decoder/sgm/modules/diffusionmodules/util.py:150–156  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

148
149
150def zero_module(module):
151 """
152 Zero out the parameters of a module and return it.
153 """
154 for p in module.parameters():
155 p.detach().zero_()
156 return module
157
158
159def scale_module(module, scale):

Callers 4

__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70
__init__Method · 0.70

Calls 1

parametersMethod · 0.80

Tested by

no test coverage detected