Embeddings
Generate clip-level embeddings for search, question answering, filtering, and duplicate removal.
Use Cases
- Prepare semantic vectors for search, clustering, and near-duplicate detection.
- Score optional text prompts against clip content.
- Enable downstream filtering or retrieval tasks that need clip-level vectors.
Before You Start
- Create clips upstream. Refer to Clipping.
- Provide frames for embeddings or sample at the required rate. Refer to Frame Extraction.
- Access to model weights on each node (the stages download weights if missing).
Quickstart
Use the pipeline stages or the example script flags to generate clip-level embeddings.
Pipeline Stage
Script Flags
Embedding Options
Cosmos-Embed1
-
Add
CosmosEmbed1FrameCreationStageto transform extracted frames into model-ready tensors. -
Add
CosmosEmbed1EmbeddingStageto generateclip.cosmos_embed1_embeddingand optionalclip.cosmos_embed1_text_match.
Parameters
CosmosEmbed1FrameCreationStage
CosmosEmbed1EmbeddingStage
Outputs
clip.cosmos_embed1_frames→ temporary tensors used by the embedding stageclip.cosmos_embed1_embedding→ final clip-level vector (NumPy array)- Optional:
clip.cosmos_embed1_text_match
Troubleshooting
- Not enough frames for embeddings: Increase
target_fpsduring frame extraction or adjust clip length so that the model receives the required number of frames. - Out of memory during embedding: Lower
gpu_memory_gb, reduce batch size if exposed, or use a smaller resolution variant. - Weights not found on node: Confirm
model_dirand network access. The stages download weights if missing.
Next Steps
- Use embeddings for duplicate removal. Refer to Duplicate Removal.
- Generate captions and previews for review workflows. Refer to Captions & Preview.