> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/curator/llms.txt.
> For full documentation content, see https://docs.nvidia.com/nemo/curator/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/curator/_mcp/server.

# nemo_curator.models.clip

## Module Contents

### Classes

| Name                                                                   | Description                                                         |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [`CLIPAestheticScorer`](#nemo_curator-models-clip-CLIPAestheticScorer) | A model that chains CLIPImageEmbeddings and AestheticScorer models. |
| [`CLIPImageEmbeddings`](#nemo_curator-models-clip-CLIPImageEmbeddings) | Interface for generating CLIP image embeddings from input images.   |

### Data

[`_CLIP_MODEL_ID`](#nemo_curator-models-clip-_CLIP_MODEL_ID)

[`_CLIP_MODEL_REVISION`](#nemo_curator-models-clip-_CLIP_MODEL_REVISION)

### API

```python
class nemo_curator.models.clip.CLIPAestheticScorer(
    model_dir: str
)
```

**Bases:** [ModelInterface](/nemo-curator/nemo_curator/models/base#nemo_curator-models-base-ModelInterface)

A model that chains CLIPImageEmbeddings and AestheticScorer models.

Get the model ID names.

```python
nemo_curator.models.clip.CLIPAestheticScorer.__call__(
    images: torch.Tensor | numpy.typing.NDArray[numpy.uint8]
) -> torch.Tensor
```

Call the CLIPAestheticScorer model.

**Parameters:**

The images to score.

**Returns:** `torch.Tensor`

The scores.

```python
nemo_curator.models.clip.CLIPAestheticScorer.download_weights_on_node(
    model_dir: str
) -> None
```

classmethod

Download the weights for the CLIPAestheticScorer model on the node.

```python
nemo_curator.models.clip.CLIPAestheticScorer.setup() -> None
```

Set up the CLIPAestheticScorer model.

```python
class nemo_curator.models.clip.CLIPImageEmbeddings(
    model_dir: str
)
```

**Bases:** [ModelInterface](/nemo-curator/nemo_curator/models/base#nemo_curator-models-base-ModelInterface)

Interface for generating CLIP image embeddings from input images.

Get the model ID names.

```python
nemo_curator.models.clip.CLIPImageEmbeddings.__call__(
    images: torch.Tensor | numpy.typing.NDArray[numpy.uint8] | list[numpy.ndarray]
) -> torch.Tensor
```

Call the CLIPImageEmbeddings model.

**Parameters:**

The images to embed.

**Returns:** `torch.Tensor`

The embeddings.

```python
nemo_curator.models.clip.CLIPImageEmbeddings.download_weights_on_node(
    model_dir: str
) -> None
```

classmethod

Download the weights for the CLIPImageEmbeddings model on the node.

```python
nemo_curator.models.clip.CLIPImageEmbeddings.encode_text(
    texts: list[str]
) -> torch.Tensor
```

Encode text(s) to normalized CLIP text embeddings.

**Parameters:**

List of strings to encode.

**Returns:** `torch.Tensor`

Normalized text embeddings, shape (len(texts), dim).

```python
nemo_curator.models.clip.CLIPImageEmbeddings.setup() -> None
```

Set up the CLIPImageEmbeddings model.

```python
nemo_curator.models.clip._CLIP_MODEL_ID: Final = 'openai/clip-vit-large-patch14'
```

```python
nemo_curator.models.clip._CLIP_MODEL_REVISION: Final = '32bd642'
```