def convert_unet_state_dict_to_peft(state_dict):
    r"""
    Converts a state dict from UNet format to diffusers format - i.e. by removing some keys
    """
    mapping = UNET_TO_DIFFUSERS
    return convert_state_dict(state_dict, mapping)

    Converts a state dict from UNet format to diffusers format - i.e. by removing some keys
    
src/diffusers/utils/state_dict_utils.py