After fine tuning, is it expected that we use peft to merge the adapter back to the base ChatTTS? How do we apply the LoRA weights to the model for inference? When I try to merge with peft, I get a voice that doesn't resemble the training data.
def load_model_with_adapter(base_model_id: str, adapter_model_id: str, device: torch.device) -> torch.nn.Module:
base_model = AutoModelForCausalLM.from_pretrained(base_model_id)
base_model.to(device)
model = PeftModel.from_pretrained(base_model, adapter_model_id)
merged_model = model.merge_and_unload()
return merged_model
After fine tuning, is it expected that we use peft to merge the adapter back to the base ChatTTS? How do we apply the LoRA weights to the model for inference? When I try to merge with peft, I get a voice that doesn't resemble the training data.