MCPcopy Create free account
hub / github.com/huggingface/diffusers / _get_submodule_from_fqn

Function _get_submodule_from_fqn

src/diffusers/hooks/_common.py:57–61  ·  view source on GitHub ↗
(module: torch.nn.Module, fqn: str)

Source from the content-addressed store, hash-verified

55
56
57def _get_submodule_from_fqn(module: torch.nn.Module, fqn: str) -> torch.nn.Module | None:
58 for submodule_name, submodule in module.named_modules():
59 if submodule_name == fqn:
60 return submodule
61 return None

Callers 2

_apply_layer_skip_hookFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…