> Documentation index for agents: https://docs.rocketride.ai/llms.txt

# embedding_image

A RocketRide embedding node that turns image documents or image streams into vectors for a multimodal vector store; choose it when the source is an image rather than text or video.

## About Hugging Face

Hugging Face develops widely used open-source tooling and model repositories for machine learning. Its Transformers library provides common interfaces for loading and running pretrained models, including vision models.

## What it does

The node accepts image documents or a raw image stream and adds an `embedding` plus the producing `embedding_model`. Choose it over `embedding_transformer` for visual content and over `embedding_video` when frames have already been extracted. For the `documents` lane, every document must be an Image document; another type raises `ValueError`.

## Lanes

| Lane in | Lane out | Description |
|---|---|---|
| `documents` | `documents` | Decodes Image documents and enriches them with an embedding. |
| `image` | `documents` | Buffers a raw image stream and emits an embedded Image document. |

## Profiles

Default: **OpenAI - 16x16 - good performance, lower memory** (`openai-patch16`).

| Profile | Model | Context |
|---|---|---|
| `openai-patch16` *(default)* | `openai/clip-vit-base-patch16` | Default vision model. |
| `openai-patch32` | `openai/clip-vit-base-patch32` | Alternative CLIP profile. |
| `google16x224` | `google/vit-base-patch16-224` | ViT profile. |
| `custom` | User-provided | Enter a compatible Hugging Face model identifier. |

## Configuration

Choose a supplied profile for the corresponding bundled model; use Custom only when the exact model identifier is known to work with the implementation. The output vector shape comes from the chosen model, so select the same profile used when building the target vector index.

### Model

The default is `openai/clip-vit-base-patch16`. Model names containing `clip` use image features from the CLIP path; other names use the model output path. Change this only when the destination index and retrieval configuration can accommodate the new vector shape; a mismatch will make stored and query vectors incompatible.

## Requirements

The node declares GPU capability. Its embedding model is loaded through the model provider; the source does not define a CPU-only fallback, so provision a compatible model runtime when using this node.

## Notes

### Image stream output

On completion of an `image` stream, the node emits a base64-backed Image document and assigns a `chunkId`. Stream source details and the source stem are retained when supplied; documents on the `documents` lane retain their upstream provenance.

## Upstream docs

- [Hugging Face Transformers documentation](https://huggingface.co/docs/transformers)

<!-- ROCKETRIDE:GENERATED:PARAMS START -->
<!-- Generated by nodes:docs-generate. Do not edit by hand. -->

## Schema

| Field | Type | Description | Default |
|---|---|---|---|
| `embedding.model` | `string` | **Model name**<br/>Hugging face model to use for embedding |  |
| `embedding.profile` | `string` | **Model**<br/>Embedding model | `"openai-patch16"` |

## Source

[<svg viewBox="0 0 16 16" width="15" height="15" fill="currentColor" aria-hidden="true" style="vertical-align:-0.15em;margin-right:0.35em"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg> View source](https://github.com/rocketride-org/rocketride-server/tree/develop/nodes/src/nodes/embedding_image)
<!-- ROCKETRIDE:GENERATED:PARAMS END -->
