MCPcopy Create free account
hub / github.com/Shakker-Labs/RepText / fn_recursive_add_processors

Method fn_recursive_add_processors

controlnet_flux.py:129–136  ·  view source on GitHub ↗
(name: str, module: torch.nn.Module, processors: Dict[str, AttentionProcessor])

Source from the content-addressed store, hash-verified

127 processors = {}
128
129 def fn_recursive_add_processors(name: str, module: torch.nn.Module, processors: Dict[str, AttentionProcessor]):
130 if hasattr(module, "get_processor"):
131 processors[f"{name}.processor"] = module.get_processor()
132
133 for sub_name, child in module.named_children():
134 fn_recursive_add_processors(f"{name}.{sub_name}", child, processors)
135
136 return processors
137
138 for name, module in self.named_children():
139 fn_recursive_add_processors(name, module, processors)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected