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

Method pack_weights

diffusers/src/diffusers/loaders/lora_base.py:714–717  ·  view source on GitHub ↗
(layers, prefix)

Source from the content-addressed store, hash-verified

712
713 @staticmethod
714 def pack_weights(layers, prefix):
715 layers_weights = layers.state_dict() if isinstance(layers, torch.nn.Module) else layers
716 layers_state_dict = {f"{prefix}.{module_name}": param for module_name, param in layers_weights.items()}
717 return layers_state_dict
718
719 @staticmethod
720 def write_lora_layers(

Callers 6

save_lora_weightsMethod · 0.45
save_lora_weightsMethod · 0.45
save_lora_weightsMethod · 0.45
save_lora_weightsMethod · 0.45
save_lora_weightsMethod · 0.45
save_lora_weightsMethod · 0.45

Calls 1

state_dictMethod · 0.45

Tested by

no test coverage detected