def to_device(self, model):
        """A helper function to move a model to GPU or cpu"""
        if self.half:
            model = model.half()
        return model.to(self.device)
A helper function to move a model to GPU or cpu
parrots/tts.py