VisionSqueezer
Providers

DeepSeek Flash + DeepSeek-VL2

Current DeepSeek Flash vision support plus the legacy DeepSeek-VL2 local profile.

DeepSeek Flash API

The current deepseek-flash API accepts JPEG, PNG, GIF, and WebP images through the OpenAI-compatible Chat Completions and Responses APIs. DeepSeek documents an upper bound of 384 image tokens per image; the exact internal resize is provider-managed, so VisionSqueezer reports a conservative cap and focuses on crop/file-size reduction.

Terminal
vision-squeezer image.png --model deepseek --json --dry-run

Use deepseek-local or deepseek-vl when running the open-weight DeepSeek-VL2 profile below.

How DeepSeek-VL2 processes images

DeepSeek-VL2 uses a 384×384 global view plus dynamic local tiles on an anyres canvas of (m·384, n·384) with m·n ≤ 9. The encoder is SigLIP-SO400M-384 (14px patch) with a 2× downsample, giving a per-view grid side of h = ⌈(384/14)/2⌉ = 14.

The exact token count (from tokenize_with_images):

h          = 14
global view = h·(h+1) = 210          # +1 per row = line separator
separator   = 1
local tiles = (nh·h)·(nw·h + 1)      # nw·nh ≤ 9
tokens      = 210 + 1 + local

The 384px boundary

Imagenw × nhTokens
≤ 384×3841×1211 + 210 = 421
768×7682×2211 + 28·29 = 1,023
1152×11523×3211 + 42·43 = 2,017

Snapping each side down to the 384px grid keeps nw·nh (and the token bill) minimal.

Optimization strategy

≤384px stays a single tile; otherwise snap each side down to the 384px grid.

Terminal
vision-squeezer image.png --model deepseek-local

CLI aliases: deepseek-local, deepseek-vl, deepseek-vl2. Current API aliases: deepseek, deepseek-flash. MCP target_model: "deepseek" or "deepseek-local".

Token savings

Crossing a 384px boundary adds a whole tile row or column — snapping back undoes it.

ScenarioBeforeAfterSaved
800×768 → snap to 768×7683×2 tiles · 1,415 tok2×2 tiles · 1,023 tok−28%
385×384 (1px over a tile) → 384×384617 tok421 tok−32%

A single pixel past a 384px edge can cost ~30% more. Snapping each side down to the grid keeps nw·nh minimal.

Source

DeepSeek Flash limits: official Vision API guide and multimodal release notes. DeepSeek-VL2 formula: technical report and reference implementation.