def _preload_model(self, model, content, device):
        """
            Calls vectorise for a model once. This will load in the model if it isn't already loaded.
            If `model` is a str, it should be a model name in the registry
            If `model is a dict, it should be an object containing `model_name` and `model_properties`
            Model properties will be passed to vectorise call if object exists
        """
        model_config = None
        if isinstance(model, str):
            # For models IN REGISTRY
            model_config = ModelConfig(
                model_name=model,
                model_properties=self._load_model_properties_from_model_registry(model)
            )
        elif isinstance(model, dict):
            # For models from URL
            """
            TODO: include validation from on start script (model name properties etc)
            _check_model_name(index_settings)
            """
            try:
                model_config = ModelConfig(
                    model_name=model["model"],
                    model_properties=model["modelProperties"],
                )
            except KeyError as e:
                raise exceptions.EnvVarError(
                    f"Your custom model {model} is missing either `model` or `model_properties`."
                    f"To add a custom model, it must be a dict with keys `model` and `model_properties`. "
                    f"See the examples defined in {marqo_docs.configuring_preloaded_models()}"
                ) from e

        _ = self.config.local_inference.vectorise(InferenceRequest(
            modality=Modality.TEXT,
            contents=[content],
            model_config=model_config,
            preprocessing_config=TextPreprocessingConfig(),
            device=device
        ))

            Calls vectorise for a model once. This will load in the model if it isn't already loaded.
            If `model` is a str, it should be a model name in the registry
            If `model is a dict, it should be an object containing `model_name` and `model_properties`
            Model properties will be passed to vectorise call if object exists
        
src/marqo/inference/native_inference/remote/server/on_start_script.py