Forked from vadimfedenko/analyze-images
Description
Find and compare local or attached images with vision models, with metadata search, image selection checks, and optional page-image attachment.
Stats
103 Downloads
Description
Find and compare local or attached images with vision models, with metadata search, image selection checks, and optional page-image attachment.
Stats
103 Downloads
Last updated
Updated 1 day agobyProject Files
README
English | 日本語 | 简体中文 | 한국어 | Español
Version 0.6.6
Find saved images, analyze one image or compare 2–4 images together, and optionally attach page images before the next response. A vision model can inspect images already attached to the main chat directly; analysis tools are available for saved files or a targeted recheck.
Install yuanjumay/analyze-images-advanced from LM Studio Hub and enable it in the chat. Use a model that supports tool calling.
Use a vision-capable local model or a vision-capable Strata server. Set a chat working directory for local tools and attachment imports. Disable earlier image-injection test plugins to avoid duplicate processing.
| Tool | Purpose |
|---|---|
List Local Images Advanced | List paths and metadata. |
Search Local Images Advanced | Search filenames, captions and source URLs. |
Analyze Local Image Advanced | Analyze one verified local file. |
Multi Analyze Local Images Advanced | Joint analysis of 2–4 distinct images; attachment selection check applies. |
Use exact current-chat references or confirm files with List/Search. Paths must be relative to the working directory; absolute paths, parent traversal, missing qualified paths and ambiguous basename matches are rejected. Sidecar JSON is required for analysis; supported download tools and this plugin’s attachment importer generate it. A thumbnail selection attempts to resolve its full-size image.
Before inference, readable images from the current chat are imported into aia-attachments/<SHA-256>/ with basic sidecars and exact path references. Import examines the recent 64 messages, at most 8 distinct images and 16 MiB per send, with an 8 MiB limit per image. Insert does not itself trigger this import; it runs when preprocessing executes. Metadata records identity and origin, not an invented semantic caption. Use recursive: true in List/Search to include imported subdirectories.
For Multi Analyze containing a chat attachment, the first call returns image_selection_check_required, neutral observations from the actual pixels, an ordered image mapping and verificationToken. The inspection request excludes the task, filenames and captions. The main model must compare those observations with the requested images. If correct, repeat the same ordered paths with the token; otherwise select again. Normal tool permissions still apply. Download-only comparisons can proceed directly.
Tokens are bound to image bytes, order, paths, working directory and backend/model. Changed attachment bytes fail verification. Observations and tokens are cached for 24 hours in .aia-image-reviews/; the cache is not encrypted or automatically deleted. This reduces selection mistakes but cannot guarantee visual recognition or that the main model checks the observations correctly.
imageNames should be an actual array of 2–4 exact paths. A string containing a valid JSON array is decoded once; comma-separated or otherwise ambiguous strings are rejected with retry guidance. Byte-identical images are deduplicated; at least two must remain. Input order defines the image numbering in the joint result.
Page-image attachment and next-turn carryover are on by default. Only the first HTTP(S) URL is processed. Selection prioritizes the matching JSON-LD Product.image, then a first Product, OG/Twitter images and main/article images. Explicit @inject-url works even when automatic URL processing is off. Use a real page URL on the directive line.
Priority is current manual attachments, then recent successful Analyze targets from this chat, then page images. Listing or downloading alone does not queue images. Analyze returns its result now; attaching those images to the main model occurs on a later user send. Handoff examines 64 messages and up to 8 candidates from the last 24 hours, and deduplicates identical bytes. It does not use a shared queue across chats. Native persistent attachments preserve branching; old inline references are not automatically rewritten.
| Setting | Default |
|---|---|
Image analysis backend | Auto (Strata for UI helper) |
Strata analysis model | strata |
Automatically attach page images | On |
Attach analyzed images on the next turn | On |
Default page URL | "" |
Maximum attached images | 2 (1–4) |
Start image number | 1 (1–64) |
Strata analysis Base URL | http://127.0.0.1:8080/v1 |
Strata analysis API key (optional) | "" |
Existing chat settings override defaults. Auto selects Strata for the recognized UI helper and otherwise the loaded local vision model. Explicit Strata mode uses an independent request and waits for completion. Its URL/key settings are separate from the generator’s. Manual attachments consume automatic slots; extra analyzed candidates can carry over to later sends.
Local formats: JPEG, PNG, WebP, GIF, BMP, TIFF and AVIF. Local inline transport preserves JPEG/PNG and converts other formats to PNG; the Strata route retains WebP support. Conversion applies orientation and uses the first frame, up to 40 megapixels. Image and converted-output limits are 8 MiB each and 16 MiB per automatic/multi-analysis batch. Comparison reads have a 32 MiB budget per send. Automatic limits do not delete manual attachments.
Page fetches use static HTML only, up to 3 MiB and a 45-second network budget; no JavaScript, login or recursive crawling. Automatic failures report status and retain successful attachments; explicit @inject-url failures stop preprocessing. Missing working directory, deleted uploads, altered imported copies or images outside the history window may require selecting again or reattaching. Imported images and caches remain until manually removed with the plugin stopped.
Setting labels, descriptions and choices automatically use the OS locale when the plugin starts. Supported editions are English, Japanese, Simplified Chinese, Korean and Spanish; unsupported locales fall back to English. Traditional Chinese locales currently fall back to English. Detection uses Node’s default Intl locale, with locale environment variables only as a fallback if that is unavailable. This follows the OS/runtime environment, not a language selected separately inside LM Studio. Tool names, parameter keys, stored values and model-facing tool schemas stay unchanged.
There is no language selector in the UI. For an override, edit the shared file ~/.lmstudio/plugin-data/yuanjumay/ui-language.json, created with auto on first startup when writable. Use auto, en, ja, zh-CN, ko or es. The same file controls Analyze Images Advanced, Visit Website Advanced, Strata Endpoint, File Search and File Save. Restart the affected plugins or LM Studio after editing. Missing/unreadable/invalid preferences do not prevent startup; automatic detection is used. Datetime Advanced currently has no custom configuration panel to translate.
{ "language": "auto" }
Guide text may refer to English setting names; translated tables also show those names for reference. The LM Studio application’s own controls follow its own localization. Only setting display text is localized here, not model-facing prompts or tool results.
From a local checkout, run the following in this plugin’s directory. Development files and tests are available in the source checkout, not necessarily in the Hub download.
npm ci lms dev --install
npm run check npm test
Automated tests check data handling and requests using substitute model responses. They do not establish a real model’s recognition accuracy, search decisions or answer quality.
For an old chat with inline attachment identifiers, node scripts/migrate-inline-chat.cjs "<conversation.json>" previews a repair; --apply writes it with a backup and concurrent-change check. Keep the chat idle and reload afterward. Missing source files cannot be recovered by this utility. See the publication and language policy.
Fork of vadimfedenko/analyze-images. Advanced changes: Yuan Jumay.
MIT. Original copyright and license notices are preserved.