def __call__(self, source: Image, reference: Image):
        """
        Args:
            source (Image): The image where makeup will be transferred to.
            reference (Image): Image containing targeted makeup.
        Return:
            Image: Transferred image.
        """
        source_input, face, crop_face = self.preprocess(source)
        reference_input, _, _ = self.preprocess(reference)

        if not (source_input and reference_input):
            return source

        for i in range(len(source_input)):
            source_input[i] = source_input[i].to(self.device)

        for i in range(len(reference_input)):
            reference_input[i] = reference_input[i].to(self.device)

        # TODO: Abridge the parameter list.
        result = self.solver.test(*source_input, *reference_input)

        source_crop = source.crop((crop_face.left(), crop_face.top(), crop_face.right(), crop_face.bottom()))
        result = self.postprocess(source_crop, result)
        return result

        Args:
            source (Image): The image where makeup will be transferred to.
            reference (Image): Image containing targeted makeup.
        Return:
            Image: Transferred image.
        
scripts/easyphoto_utils/psgan_utils.py