MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / _basic_init

Method _basic_init

diffsynth/models/omnigen.py:384–388  ·  view source on GitHub ↗
(module)

Source from the content-addressed store, hash-verified

382
383 # Initialize transformer layers:
384 def _basic_init(module):
385 if isinstance(module, nn.Linear):
386 torch.nn.init.xavier_uniform_(module.weight)
387 if module.bias is not None:
388 nn.init.constant_(module.bias, 0)
389 self.apply(_basic_init)
390
391 # Initialize patch_embed like nn.Linear (instead of nn.Conv2d):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected