Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

Dibachain
/
Diba-Vision

Image-Text-to-Text
Transformers
Safetensors
Persian
English
diba_vision
vision-language
multimodal
vlm
ocr
persian
farsi
iran
chat
dibachain
conversational
custom_code
Model card Files Files and versions
xet
Community

Instructions to use Dibachain/Diba-Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use Dibachain/Diba-Vision with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("image-text-to-text", model="Dibachain/Diba-Vision", trust_remote_code=True)
    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)
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoModelForImageTextToText
    model = AutoModelForImageTextToText.from_pretrained("Dibachain/Diba-Vision", trust_remote_code=True, device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • vLLM

    How to use Dibachain/Diba-Vision with vLLM:

    Install from pip and serve model
    # Install vLLM from pip:
    pip install vllm
    # Start the vLLM server:
    vllm serve "Dibachain/Diba-Vision"
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:8000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Dibachain/Diba-Vision",
    		"messages": [
    			{
    				"role": "user",
    				"content": [
    					{
    						"type": "text",
    						"text": "Describe this image in one sentence."
    					},
    					{
    						"type": "image_url",
    						"image_url": {
    							"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
    						}
    					}
    				]
    			}
    		]
    	}'
    Use Docker
    docker model run hf.co/Dibachain/Diba-Vision
  • SGLang

    How to use Dibachain/Diba-Vision with SGLang:

    Install from pip and serve model
    # Install SGLang from pip:
    pip install sglang
    # Start the SGLang server:
    python3 -m sglang.launch_server \
        --model-path "Dibachain/Diba-Vision" \
        --host 0.0.0.0 \
        --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Dibachain/Diba-Vision",
    		"messages": [
    			{
    				"role": "user",
    				"content": [
    					{
    						"type": "text",
    						"text": "Describe this image in one sentence."
    					},
    					{
    						"type": "image_url",
    						"image_url": {
    							"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
    						}
    					}
    				]
    			}
    		]
    	}'
    Use Docker images
    docker run --gpus all \
        --shm-size 32g \
        -p 30000:30000 \
        -v ~/.cache/huggingface:/root/.cache/huggingface \
        --env "HF_TOKEN=<secret>" \
        --ipc=host \
        lmsysorg/sglang:latest \
        python3 -m sglang.launch_server \
            --model-path "Dibachain/Diba-Vision" \
            --host 0.0.0.0 \
            --port 30000
    # Call the server using curl (OpenAI-compatible API):
    curl -X POST "http://localhost:30000/v1/chat/completions" \
    	-H "Content-Type: application/json" \
    	--data '{
    		"model": "Dibachain/Diba-Vision",
    		"messages": [
    			{
    				"role": "user",
    				"content": [
    					{
    						"type": "text",
    						"text": "Describe this image in one sentence."
    					},
    					{
    						"type": "image_url",
    						"image_url": {
    							"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
    						}
    					}
    				]
    			}
    		]
    	}'
  • Docker Model Runner

    How to use Dibachain/Diba-Vision with Docker Model Runner:

    docker model run hf.co/Dibachain/Diba-Vision
Diba-Vision
9.34 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 1 commit
DibaAi's picture
DibaAi
Release
ffd2e20 20 days ago
  • .gitattributes
    1.57 kB
    Release 20 days ago
  • LICENSE
    11.4 kB
    Release 20 days ago
  • NOTICE
    709 Bytes
    Release 20 days ago
  • README.md
    6.52 kB
    Release 20 days ago
  • chat_template.jinja
    7.76 kB
    Release 20 days ago
  • config.json
    3.07 kB
    Release 20 days ago
  • configuration_diba_vision.py
    1.29 kB
    Release 20 days ago
  • handler.py
    4.28 kB
    Release 20 days ago
  • merges.txt
    3.35 MB
    Release 20 days ago
  • model.safetensors-00001-of-00002.safetensors
    5.33 GB
    xet
    Release 20 days ago
  • model.safetensors-00002-of-00002.safetensors
    3.99 GB
    xet
    Release 20 days ago
  • model.safetensors.index.json
    74.7 kB
    Release 20 days ago
  • modeling_diba_vision.py
    384 Bytes
    Release 20 days ago
  • preprocessor_config.json
    406 Bytes
    Release 20 days ago
  • processing_diba_vision.py
    526 Bytes
    Release 20 days ago
  • requirements.txt
    62 Bytes
    Release 20 days ago
  • tokenizer.json
    12.8 MB
    xet
    Release 20 days ago
  • tokenizer_config.json
    15.1 kB
    Release 20 days ago
  • video_preprocessor_config.json
    405 Bytes
    Release 20 days ago
  • vocab.json
    6.72 MB
    Release 20 days ago