def extract_adapter_weights(model):
    """Extract adapter weights from a model

    Args:
        model: A model instance

    Returns:
        dict: adapter weights state dict (adapter name: cond_emb)
    """

    adapter_state_dict = {}
    for name, param in model.named_parameters():
        if "cond_adapter" in name:
            adapter_state_dict[name] = param.data.clone()

    return adapter_state_dict
Extract adapter weights from a model

Args:
model: A model instance

Returns:
dict: adapter weights state dict (adapter name: cond_emb)
models/tts/metis/metis.py