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

Function _collate_lora_metadata

src/diffusers/training_utils.py:352–357  ·  view source on GitHub ↗
(modules_to_save: dict[str, torch.nn.Module])

Source from the content-addressed store, hash-verified

350
351
352def _collate_lora_metadata(modules_to_save: dict[str, torch.nn.Module]) -> dict[str, Any]:
353 metadatas = {}
354 for module_name, module in modules_to_save.items():
355 if module is not None:
356 metadatas[f"{module_name}_lora_adapter_metadata"] = module.peft_config["default"].to_dict()
357 return metadatas
358
359
360def compute_density_for_timestep_sampling(

Callers 15

save_model_hookFunction · 0.90
mainFunction · 0.90
save_model_hookFunction · 0.90
mainFunction · 0.90
save_model_hookFunction · 0.90
mainFunction · 0.90
save_model_hookFunction · 0.90
mainFunction · 0.90
save_model_hookFunction · 0.90
mainFunction · 0.90
save_model_hookFunction · 0.90
mainFunction · 0.90

Calls 1

to_dictMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…