MCPcopy Index your code
hub / github.com/huggingface/diffusers / pack_weights

Method pack_weights

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

Source from the content-addressed store, hash-verified

1003
1004 @staticmethod
1005 def pack_weights(layers, prefix):
1006 layers_weights = layers.state_dict() if isinstance(layers, torch.nn.Module) else layers
1007 return _pack_dict_with_prefix(layers_weights, prefix)
1008
1009 @staticmethod
1010 def write_lora_layers(

Callers 2

_save_lora_weightsMethod · 0.45
save_lora_weightsMethod · 0.45

Calls 2

_pack_dict_with_prefixFunction · 0.85
state_dictMethod · 0.45

Tested by

no test coverage detected