MCPcopy Create free account
hub / github.com/AiuniAI/Unique3D / NNModuleWrapper

Class NNModuleWrapper

custum_3d_diffusion/custum_modules/attention_processors.py:269–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267 recursive_add_processors(name, module)
268
269class NNModuleWrapper(torch.nn.Module):
270 def __init__(self, module):
271 super().__init__()
272 self.module = module
273
274 def forward(self, *args, **kwargs):
275 return self.module(*args, **kwargs)
276
277 def __getattr__(self, name: str):
278 try:
279 return super().__getattr__(name)
280 except AttributeError:
281 return getattr(self.module, name)
282
283class AttnProcessorSwitch(torch.nn.Module):
284 def __init__(

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected