Skip to content

1.1.4 — VLMs OCR & Architecture Improvements

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Oct 16:02

Release 1.1.4 — VLMs OCR for Obsidian

Comprehensive release introducing local and cloud Vision-Language Model (VLM) capabilities, low-VRAM optimizations for entry-level GPUs (2GB VRAM), automatic output detection, math table support, and full compliance with the Obsidian Community Plugin guidelines.


Key Features & Architecture Improvements

1. Low-VRAM Optimization (2GB MX450 / Entry-Level GPUs)

  • Native GGUF Inference with llama.cpp: Support for GLM-OCR (0.9B parameters) quantized to Q4_K_M (~531 MB weights) and multimodal projector mmproj-Q8_0 (~484 MB), fitting comfortably within 1.7 GB available VRAM.
  • Smart Image Downscaling: Proportional downscaling to 1536px maximum dimension (src/image_processor.ts) to prevent visual token explosion and GPU Out-Of-Memory (OOM) errors.
  • In-Memory Clipboard Pipeline: Processes images directly in RAM via Buffer and Base64 data URLs without writing intermediate files to disk.

2. Configurable OCR Modes & Prompts

  • Automatic Output Detection (auto): Automatically detects whether an image contains text, LaTeX formulas, Markdown tables, or complex charts/diagrams and provides the optimal structured representation.
  • Chart & Diagram Analytical Description (describe): Produces deep technical summaries for scientific plots, flowcharts, architectures, and diagrams.
  • Specialized Modes:
    • document: Full structured Markdown formatting.
    • formulas: LaTeX expressions wrapped in $$ or $.
    • tables: Markdown tables with aligned columns.
    • text: Plain text extraction.
    • custom: User-defined prompt instructions.

3. Robust LaTeX Math & Table Formatting

  • LaTeX Math Normalization: Automatically wraps raw formulas into proper $$ display math or $ inline math, removing unwanted markdown code fence blocks.
  • Complex Math Tables:
    • Automatically escapes LaTeX absolute values/norms (\|) within formulas so Markdown tables do not break columns.
    • Decodes HTML entities (', &, <, >).
    • Converts HTML <table> elements generated by vision models into clean Obsidian Markdown tables.

4. UI/UX Modernization

  • Neutral Placeholder: Replaced disruptive math blocks with a discreet HTML comment placeholder (<!-- [OCR is being generated... line N] -->).
  • Modernized Settings: Full adoption of Obsidian's Setting.setHeading() API, low-VRAM one-click preset button, and streamlined configuration.

Code Quality & Community Plugin Compliance

  • Complete Open-Source Repository: Full source tree (src/, src/models/, tsconfig.json, esbuild.config.mjs) synchronized on GitHub with official GPL-3.0 License.
  • Obsidian Helper Compliance: Replaced direct DOM calls (document.createElement) with native Obsidian helpers (createEl, createSpan).
  • Strict TypeScript & ESLint: Eliminated all any usages and unhandled promises; typed Electron safe storage integration; verified against eslint-plugin-obsidianmd.
  • Security Disclosures: Detailed explanation in README of local process execution (llama-server) and filesystem access for note assets.
  • CI/CD Build: Verified end-to-end compilation with tsc and esbuild running on GitHub Actions.