Instructions to use bollscoasts/pix2act-weblinx-base-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bollscoasts/pix2act-weblinx-base-onnx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="bollscoasts/pix2act-weblinx-base-onnx")# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("bollscoasts/pix2act-weblinx-base-onnx") model = AutoModelForImageTextToText.from_pretrained("bollscoasts/pix2act-weblinx-base-onnx") - Transformers.js
How to use bollscoasts/pix2act-weblinx-base-onnx with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-text-to-text', 'bollscoasts/pix2act-weblinx-base-onnx'); - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use bollscoasts/pix2act-weblinx-base-onnx with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bollscoasts/pix2act-weblinx-base-onnx" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bollscoasts/pix2act-weblinx-base-onnx", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bollscoasts/pix2act-weblinx-base-onnx
- SGLang
How to use bollscoasts/pix2act-weblinx-base-onnx 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 "bollscoasts/pix2act-weblinx-base-onnx" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bollscoasts/pix2act-weblinx-base-onnx", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "bollscoasts/pix2act-weblinx-base-onnx" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bollscoasts/pix2act-weblinx-base-onnx", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bollscoasts/pix2act-weblinx-base-onnx with Docker Model Runner:
docker model run hf.co/bollscoasts/pix2act-weblinx-base-onnx
Pix2Act-WebLINX-Base ONNX
ONNX export of McGill-NLP/pix2act-base-weblinx optimized for browser and server-side inference.
Model Details
| Property | Value |
|---|---|
| Original Model | McGill-NLP/pix2act-base-weblinx |
| Architecture | Pix2Struct (Vision2Seq) |
| Parameters | ~282M |
| Export Format | ONNX (opset 17) |
| Quantization | INT8 dynamic |
| Model Size | ~1.17 GB (quantized) |
| Browser Eligible | Borderline (works with WebGPU) |
Description
Pix2Act-WebLINX is fine-tuned on the WebLINX dataset for real-world web navigation tasks. It uses a pixel-only approach (no HTML/DOM access) making it ideal for:
- Web automation tasks
- GUI interaction from screenshots
- Cross-platform browser control
- Accessibility applications
Files
| File | Size | Description |
|---|---|---|
encoder_model.onnx |
88 MB | Vision encoder |
decoder_model.onnx |
183 MB | Text decoder |
decoder_with_past.onnx |
170 MB | Decoder with KV-cache |
decoder_model_merged.onnx |
728 MB | Merged decoder (for Transformers.js) |
Usage
With ONNX Runtime (Python)
import onnxruntime as ort
from transformers import AutoProcessor
from PIL import Image
# Load processor
processor = AutoProcessor.from_pretrained("bollscoasts/pix2act-weblinx-base-onnx")
# Load ONNX model
session = ort.InferenceSession("encoder_model.onnx")
# Process image
image = Image.open("screenshot.png")
inputs = processor(images=image, return_tensors="np")
# Run inference
outputs = session.run(None, dict(inputs))
With Transformers.js (Browser)
import { pipeline } from "@xenova/transformers";
// Load the ONNX model
const pipe = await pipeline("image-to-text", "bollscoasts/pix2act-weblinx-base-onnx");
// Run inference on screenshot
const result = await pipe(image);
console.log(result);
Export Details
Exported using HotelBench ONNX export utilities.
The original model was missing the image processor config, which was restored from
google/pix2struct-base to enable ONNX export.
Performance
- Browser (WebGPU): ~500-1000ms inference time
- Server (CUDA): ~100-200ms inference time
- Server (CPU): ~1-2s inference time
Citation
@article{pix2act,
title={From Pixels to UI Actions: Learning to Follow Instructions via Graphical User Interfaces},
author={Shaw, Peter and Joshi, Mandar and Cohan, Iz and Berant, Jonathan and Pasupat, Panupong and Shin, Hexiang and Gur, Izzeddin and Kwiatkowski, Tom and Zhang, Kenton Lee},
journal={NeurIPS 2023},
year={2023}
}
@article{weblinx,
title={WebLINX: Real-World Website Navigation with Multi-Turn Dialogue},
author={Lù, Xing Han and Kasner, Zdeněk and Reddy, Siva},
journal={ICML 2024},
year={2024}
}
License
Apache 2.0 - See original model for full license details.
- Downloads last month
- 2
Model tree for bollscoasts/pix2act-weblinx-base-onnx
Base model
McGill-NLP/pix2act-base-weblinx