def _generate_clip_type(self) -> CLIPType:
        """
        Generate a CLIPType object that contains the model location for each modality.

        Returns:
            A CLIPType object that contains the model location for each modality.
        """
        if self.model_properties.name:
            # Loading from a registered Languagebind model
            if self.model_properties.name not in self.MODEL_NAME_CLIP_TYPE_MAPPING:
                raise InvalidModelPropertiesError(
                    f"Model name '{self.model_properties.name}' is not a registered Languagebind model."
                    f"If you are loading a custom model, please provide the modelLocation and remove the 'name' field"
                )
            clip_type = self.MODEL_NAME_CLIP_TYPE_MAPPING[self.model_properties.name]
        elif self.model_properties.modelLocation:
            # Custom model loading
            clip_type_dict = {
                "image": None,
                "video": None,
                "audio": None
            }
            for modality in self.model_properties.supportedModalities:
                if modality == Modality.TEXT or modality == "text":
                    continue
                model_location: ModalityLocation = getattr(self.model_properties.modelLocation, modality)
                if model_location is None:
                    continue
                elif model_location.hf and not model_location.hf.filename:
                    clip_type_dict[modality.value] = model_location.hf.repo_id
                elif (model_location.hf and model_location.hf.filename) or model_location.s3 or model_location.url:
                    downloaded_zip_file = self._download_languagebind_model(model_location)
                    clip_type_dict[modality.value] = extract_zip_file(downloaded_zip_file)
                else:
                    raise InternalError(
                        f"Invalid model location {model_location} provided for modality {modality}"
                    )
            clip_type = CLIPType(**clip_type_dict)
        else:
            raise InvalidModelPropertiesError("Invalid model properties provided. Either 'name' or "
                                              "'modelLocation' must be provided.")
        return clip_type

        Generate a CLIPType object that contains the model location for each modality.

        Returns:
            A CLIPType object that contains the model location for each modality.
        
src/marqo/inference/native_inference/embedding_models/languagebind_model.py