Diba-Vision · دیبا-ویژن

A Persian-first vision-language model by Dibachain مدل بینایی-زبانی فارسی‌محور، ساخته‌ی دیباچین

🌐 dibachain.ir · 🤖 Agent · Chat demo (GPU) · Diba-Base · Diba-Embed


English

Diba-Vision sees images and answers in Persian and English. It joins the vision understanding of a strong multimodal encoder with the Persian language ability of the Diba family, so it can look at a picture, a document, or a screenshot and talk about it fluently in Persian — where most open vision models are weak.

What it can do

  • Describe images in natural Persian or English.
  • Read text in images — Persian and English signs, documents, forms, and handwriting‑style print (OCR‑like understanding).
  • Analyze screenshots — UI screens, charts, tables, and screenshots of code.
  • Answer questions about a picture — "what is happening here?", "what does this sign say?", "what is wrong with this UI?".
  • Reason across image + text in a single conversation.

Inputs and outputs

  • Input: one or more images together with a text prompt (multi‑turn chat supported).
  • Output: text, in the language of your question.

Specifications

Type Vision‑language model (image + text → text)
Parameters ~4B
Languages Persian‑first, plus English
License Apache 2.0

Quick start

from transformers import AutoModelForImageTextToText, AutoProcessor
from PIL import Image
import torch

model = AutoModelForImageTextToText.from_pretrained(
    "Dibachain/Diba-Vision", trust_remote_code=True, dtype=torch.bfloat16, device_map="auto")
processor = AutoProcessor.from_pretrained("Dibachain/Diba-Vision", trust_remote_code=True)

messages = [{"role": "user", "content": [
    {"type": "image", "image": "path/or/url/to/image.jpg"},
    {"type": "text", "text": "این تصویر را به فارسی توضیح بده."},
]}]

inputs = processor.apply_chat_template(messages, add_generation_prompt=True,
    tokenize=True, return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512)
print(processor.batch_decode(out[:, inputs["input_ids"].shape[1]:], skip_special_tokens=True)[0])

Diba-Vision ships with the Diba model definition, so pass trust_remote_code=True when loading.

Intended use and limitations

Diba-Vision is for understanding images and answering about them, not for generating images. Quality is strongest on everyday photos, documents, and screens; very small text, low‑quality scans, or highly specialized diagrams may be misread. It reflects biases present in its training data. For text‑only chat and code use Diba-Base; for semantic search use Diba-Embed.


فارسی

دیبا-ویژن عکس را می‌بیند و به فارسی و انگلیسی پاسخ می‌دهد. این مدل، درک تصویری یک رمزگذار چندحالته‌ی قوی را با توانایی زبان فارسیِ خانواده‌ی دیبا ترکیب می‌کند؛ پس می‌تواند به یک عکس، سند یا اسکرین‌شات نگاه کند و روان درباره‌اش فارسی حرف بزند، جایی که بیشتر مدل‌های بینایی متن‌باز ضعیف‌اند.

چه کارهایی انجام می‌دهد

  • توصیف تصویر به فارسی یا انگلیسیِ روان.
  • خواندن متن داخل تصویر: تابلوها، اسناد، فرم‌ها و متن‌های فارسی و انگلیسی (درک شبیه به OCR).
  • تحلیل اسکرین‌شات: صفحه‌های رابط کاربری، نمودار، جدول و اسکرین‌شات کد.
  • پاسخ به پرسش درباره‌ی عکس: «اینجا چه خبر است؟»، «این تابلو چه نوشته؟»، «مشکل این رابط کاربری چیست؟».
  • استدلال هم‌زمان روی تصویر و متن در یک گفتگو.

ورودی و خروجی

  • ورودی: یک یا چند تصویر همراه با یک پرسش متنی (گفتگوی چندمرحله‌ای پشتیبانی می‌شود).
  • خروجی: متن، به همان زبان پرسش شما.

مشخصات

نوع مدل بینایی-زبانی (تصویر + متن ← متن)
تعداد پارامتر حدود ۴ میلیارد
زبان‌ها فارسی‌محور، به‌همراه انگلیسی
مجوز Apache 2.0

شروع سریع

از همان کد بخش انگلیسی استفاده کنید. هنگام بارگذاری، trust_remote_code=True را بدهید و برای پرسش‌های جست‌وجو تصویر و متن را با هم بفرستید.

کاربرد و محدودیت‌ها

دیبا-ویژن برای درک تصویر و پاسخ درباره‌ی آن است، نه برای تولید تصویر. بهترین کیفیت روی عکس‌های روزمره، اسناد و صفحه‌هاست؛ متن‌های بسیار ریز، اسکن‌های بی‌کیفیت یا نمودارهای خیلی تخصصی ممکن است اشتباه خوانده شوند. مدل سوگیری‌های داده‌ی خود را بازتاب می‌دهد. برای گفتگوی متنی و کد از Diba-Base و برای جست‌وجوی معنایی از Diba-Embed استفاده کنید.


خانواده‌ی دیبا · The Diba family — Diba-Base · Diba-Embed · Diba-Vision · Diba-Code · Diba-TTS · Diba-STT · Diba-Image · Diba-ImageEdit

Built by Dibachain · ساخته‌ی دیباچین

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

Spaces using Dibachain/Diba-Vision 2