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

Function scale_module

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

Scale the parameters of a module and return it.

(module, scale)

Source from the content-addressed store, hash-verified

157
158
159def scale_module(module, scale):
160 """
161 Scale the parameters of a module and return it.
162 """
163 for p in module.parameters():
164 p.detach().mul_(scale)
165 return module
166
167
168def mean_flat(tensor):

Callers

nothing calls this directly

Calls 1

parametersMethod · 0.80

Tested by

no test coverage detected