How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="AaronHan/OPPO")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM

tokenizer = AutoTokenizer.from_pretrained("AaronHan/OPPO")
model = AutoModelForMultimodalLM.from_pretrained("AaronHan/OPPO", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

OPPO

This repository contains the OPPO model weights for multimodal emotion recognition and reasoning.

Model Information

  • Architecture: Qwen2_5OmniThinkerForConditionalGeneration
  • Model type: Qwen2.5-Omni thinker
  • Task: Multimodal emotion recognition and reasoning
  • Weight format: Safetensors (4 shards)

Loading the Model

from transformers import AutoProcessor, Qwen2_5OmniThinkerForConditionalGeneration

model_id = "AaronHan/OPPO"
processor = AutoProcessor.from_pretrained(model_id)
model = Qwen2_5OmniThinkerForConditionalGeneration.from_pretrained(
    model_id,
    torch_dtype="auto",
    device_map="auto",
)

Model Files

The repository includes the sharded model weights, weight index, model and generation configurations, tokenizer files, chat template, and multimodal preprocessor configurations required to load the model.

Downloads last month
103
Safetensors
Model size
1.36M params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support