MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / load

Function load

diffusers/src/diffusers/models/model_loading_utils.py:174–180  ·  view source on GitHub ↗
(module: torch.nn.Module, prefix: str = "")

Source from the content-addressed store, hash-verified

172 # PyTorch's `_load_from_state_dict` does not copy parameters in a module's descendants
173 # so we need to apply the function recursively.
174 def load(module: torch.nn.Module, prefix: str = ""):
175 args = (state_dict, prefix, {}, True, [], [], error_msgs)
176 module._load_from_state_dict(*args)
177
178 for name, child in module._modules.items():
179 if child is not None:
180 load(child, prefix + name + ".")
181
182 load(model_to_load)
183

Callers 3

text2images.pyFile · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected