MCPcopy Create free account
hub / github.com/bbaaii/DreamDiffusion / zero_module

Function zero_module

code/dc_ldm/modules/diffusionmodules/util.py:174–180  ·  view source on GitHub ↗

Zero out the parameters of a module and return it.

(module)

Source from the content-addressed store, hash-verified

172
173
174def zero_module(module):
175 """
176 Zero out the parameters of a module and return it.
177 """
178 for p in module.parameters():
179 p.detach().zero_()
180 return module
181
182
183def scale_module(module, scale):

Callers 4

__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected