MCPcopy Create free account
hub / github.com/VisionXLab/OF-Diff / scale_module

Function scale_module

ldm/modules/diffusionmodules/util.py:186–192  ·  view source on GitHub ↗

Scale the parameters of a module and return it.

(module, scale)

Source from the content-addressed store, hash-verified

184
185
186def scale_module(module, scale):
187 """
188 Scale the parameters of a module and return it.
189 """
190 for p in module.parameters():
191 p.detach().mul_(scale)
192 return module
193
194
195def mean_flat(tensor):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected