def _collect_text_embeddings(self, class_name: str) -> None:
        """Collect text embeddings using compositional prompt ensemble.

        Creates ensemble of normal and anomalous prompts based on class name.
        Prompts are tokenized and encoded to get embeddings. Embeddings are averaged
        per class and stored for inference.

        Args:
            class_name (str): Object class name for prompt ensemble.
        """
        # get the device, this is to ensure that we move the text embeddings to the same device as the model
        device = next(self.parameters()).device
        # collect prompt ensemble
        normal_prompts, anomalous_prompts = create_prompt_ensemble(class_name)
        # tokenize prompts
        normal_tokens = tokenize(normal_prompts)
        anomalous_tokens = tokenize(anomalous_prompts)
        # encode tokens to obtain prompt embeddings
        normal_embeddings = self.clip.encode_text(normal_tokens.to(device))
        anomalous_embeddings = self.clip.encode_text(anomalous_tokens.to(device))
        # average prompt embeddings
        normal_embeddings = torch.mean(normal_embeddings, dim=0, keepdim=True)
        anomalous_embeddings = torch.mean(anomalous_embeddings, dim=0, keepdim=True)
        # concatenate and store
        text_embeddings = torch.cat((normal_embeddings, anomalous_embeddings))
        self._text_embeddings = text_embeddings
Collect text embeddings using compositional prompt ensemble.

        Creates ensemble of normal and anomalous prompts based on class name.
        Prompts are tokenized and encoded to get embeddings. Embeddings are averaged
        per class and stored for inference.

        Args:
            class_name (str): Object class name for prompt ensemble.
        
src/anomalib/models/image/winclip/torch_model.py