docs/source/en/model_doc/cosmos3_edge.md
This model was contributed to Hugging Face Transformers on 2026-07-16.
Cosmos3 Edge is NVIDIA's multimodal reasoning model from the Cosmos3 family. Transformers integrates the Reasoner tower only; the checkpoint's diffusion Generator, VAE, scheduler, and other generation components remain Diffusers components.
The reasoner uses a dense, Llama-compatible language tower with 28 decoder blocks, each containing attention and an MLP. Its SigLIP2 vision encoder accepts packed variable-resolution patches, uses sequence boundaries to keep images and video frames independent during vision attention, groups patches spatially in 2×2 blocks, and projects them into the language model. Image and video inputs use multimodal rotary position IDs; video prompts are expanded into one timestamped vision span per sampled frame.
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "nvidia/Cosmos3-Edge"
model = AutoModelForImageTextToText.from_pretrained(model_id, device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/pipeline-cat-chonk.jpeg",
},
{"type": "text", "text": "Describe this image."},
],
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
generated_ids = model.generate(**inputs, max_new_tokens=128)
generated_ids = [output_ids[len(input_ids) :] for input_ids, output_ids in zip(inputs.input_ids, generated_ids)]
print(processor.batch_decode(generated_ids, skip_special_tokens=True))
[[autodoc]] Cosmos3EdgeConfig
[[autodoc]] Cosmos3EdgeTextConfig
[[autodoc]] Cosmos3EdgeVisionConfig
[[autodoc]] Cosmos3EdgeProcessor - call - apply_chat_template
[[autodoc]] Cosmos3EdgeImageProcessor - preprocess
[[autodoc]] Cosmos3EdgeImageProcessorPil - preprocess
[[autodoc]] Cosmos3EdgeVideoProcessor - preprocess
[[autodoc]] Cosmos3EdgeModel - forward - get_image_features - get_video_features
[[autodoc]] Cosmos3EdgeTextModel - forward
[[autodoc]] Cosmos3EdgeVisionModel - forward
[[autodoc]] Cosmos3EdgeForConditionalGeneration - forward - get_image_features - get_video_features