diff --git a/AGENTS.md b/AGENTS.md
new file mode 100644
index 0000000000..1b22e79b59
--- /dev/null
+++ b/AGENTS.md
@@ -0,0 +1,73 @@
+# oMLX agent guide
+
+## Project overview
+
+oMLX is a Python/FastAPI inference server for Apple Silicon Macs. It serves OpenAI-, Anthropic-, and Responses-compatible APIs over MLX models, with continuous batching, multi-model loading, VLM/audio/embedding/reranker engines, MCP tools, and tiered KV caching.
+
+Keep durable shared guidance in this file. Add nested `AGENTS.md` files only for directories with meaningfully different rules, and avoid scoped Copilot instruction files unless they add targeted value beyond these repo-wide rules.
+
+This is a fork maintained by rebasing onto `upstream/main`; its history is intentionally not kept stable. Squashing/rewriting the fork's commits since the `upstream/main` merge-base and force-pushing (`git push --force-with-lease`) is acceptable when cleaning up. Always create a `backup/*` tag before a destructive rewrite, and verify the rewrite changed no code (`git diff HEAD` is empty) before pushing. When regrouping heavily interleaved commits (features scattered among dependency bumps and rebase-cleanup chores), prefer `git reset --soft ` then re-stage per file into logical commits over an interactive reorder; the soft-reset approach keeps the final tree byte-identical and avoids reorder conflicts on shared files such as `pyproject.toml`, `README.md`, and `AGENTS.md`. The regroup pattern that stays byte-identical is a stable file-to-group mapping (image engine/registry/routes + admin Imagine + i18n; audio/video API + VLM; server/admin-chat; upstream-rebase reconciliation; git-pinned deps; Copilot integration). Because `git reset --soft`/mixed reset does NOT scrub the working tree, run the regroup only from a verified-clean checkout of the original tip (`git status` empty and `git rev-parse HEAD^{tree}` equal to the backup tree); a dirty tree left over from diagnostics silently commits stale file content and breaks tree identity. If a run drifts, `git reset --hard ` and re-run rather than patching in place. **Never use `git stash` during a merge** — it can discard `MERGE_HEAD` and break the index, leaving you stranded without merge state or staged conflict resolutions. Pushing requires the `scaryrawr` account: the default git credential helper (gcm-core / a `copilot` host helper) can resolve to a different account and 403; push with `gh auth switch --user scaryrawr` active plus an inline helper override, e.g. `git -c credential.helper= -c 'credential.https://github.com.helper=!gh auth git-credential' push --force-with-lease origin main`, then unset any local `credential.helper` entries you added.
+
+Key areas:
+
+- `omlx/server.py` wires the FastAPI app, route handlers, auth, streaming responses, and server state.
+- `omlx/cli.py`, `omlx/settings.py`, and `omlx/config.py` handle startup, persisted settings, CLI/env/file precedence, and user-visible defaults.
+- `omlx/engine_pool.py` discovers models, selects engine types, tracks loaded engines, and enforces LRU/pinning behavior.
+- `omlx/scheduler.py`, `omlx/engine/`, and `omlx/engine_core.py` own request scheduling and MLX generation.
+- `omlx/utils/model_loading.py` and `omlx/model_discovery.py` handle model loading, tokenizer setup, model classification, and image-manifest discovery. Keep `model_discovery.py`'s image exports aligned with `engine_pool.py`; validate `import omlx.server` after discovery refactors so missing cross-module exports fail fast.
+- `omlx/cache/` owns paged, prefix, hot, SSD, hybrid, vision-feature, and recovery cache behavior. Treat cache serialization and MLX buffer lifetime carefully.
+- `omlx/api/` contains API models, protocol adapters, route helpers, tool calling, thinking parsing, structured output, and SSE formatting.
+- `omlx/adapter/` contains model-family output parsers and Harmony/Gemma-specific adaptation; keep model quirks there instead of in generic server paths.
+- `omlx/admin/` contains the admin HTTP API and utilities; `apps/omlx-web/omlx_web/` owns browser routes, templates, static assets, and i18n files, packaged in the same wheel. Keep web rendering independent of `omlx` imports through `WebUIHost`.
+- `omlx/integrations/`, `omlx/mcp/`, and `omlx/eval/` cover editor/client setup, MCP execution, and evaluation helpers.
+- `packaging/` builds the macOS menubar app bundle and DMG using venvstacks.
+
+## Setup and validation
+
+Use `uv run` for Python tooling and tests. If dependencies are missing, start with `uv sync --dev`. Pin validation commands to Python 3.12 (for example, `UV_PYTHON=python3.12 uv run --python python3.12 pytest ...`): `onnxruntime==1.20.1` does not support CPython 3.14. MLX is pinned to 0.32.4 and xgrammar to 0.2.8; rebuild local custom kernels after MLX upgrades with `OMLX_WITH_CUSTOM_KERNEL=1 uv pip install --python .venv/bin/python --reinstall --no-deps -e .`. Native floating-point QMM wrappers must match MLX's template parameters and global-scale argument, even when global scaling is disabled.
+
+`uv.lock` is intentionally ignored in this repository; dependency pin changes should be tracked in `pyproject.toml` unless a task explicitly changes the lockfile policy.
+
+When bumping git-sourced dependencies, audit `[project].dependencies`, `[project.optional-dependencies]`, and `tool.uv.override-dependencies`; compare the upstream dependency metadata at the new commit (`pyproject.toml`, `requirements.txt`, or equivalent) for changed version constraints that must be mirrored locally; also check mirrors in `packaging/build.py`, `omlx/admin/routes.py` engine metadata, `Formula/omlx.rb`, `tests/test_admin_engine_info.py`, and user-facing install examples such as `README.md`. Some packaging paths intentionally duplicate pins from `pyproject.toml`; if an optional extra pin changes, run targeted validation with that extra enabled (for example `uv sync --dev --extra audio` for `mlx-audio`). For `mlx-lm` bumps, validate the scheduler and MTP BatchGenerator integration against upstream API shape changes such as stop matching (`StopSequenceMatcher` / `stop_matchers` in current pins, replacing older `SequenceStateMachine` / `state_machines`) and `GenerationBatch.Response` fields; keep every MTP response construction routed through `_generation_response`, including unfinished singleton emissions. For `mlx-vlm` bumps, smoke Qwen3.5 dense and MoE VLM generation when available: model loading alone does not exercise oMLX patches whose upstream helper APIs or call signatures may have changed. When native MTP is enabled, include a multi-token verify/rejection cycle and confirm rollback states are returned without cache-rebuild warnings; a one-token smoke does not exercise the dedicated speculative verifier.
+
+- Default fast test run: `uv run pytest`
+- Explicit fast test selection: `uv run pytest -m "not slow and not integration"`
+- Narrow test run: `uv run pytest tests/test_config.py -v`
+- Lint: `uv run ruff check .` is the intended Python lint command, but the current tree may have pre-existing full-repo ruff diagnostics; when a task is not a lint cleanup, prefer `uv run ruff check ` plus focused tests and call out any baseline failures separately. Do not include non-Python files such as `README.md` or `Formula/*.rb` in Ruff path lists; use `git diff --check` for whitespace on mixed-file changes. Ruff's SIM118 suggestion is unsafe for `safetensors.safe_open` handles in this environment; keep `f.keys()` there and add a targeted `# noqa: SIM118` if needed.
+- Type check: `uv run mypy omlx`
+- Format when needed: `uv run black .`
+- macOS app build checks live under `packaging/`; see `packaging/README.md` before running `python build.py`.
+
+`pytest.ini` defaults to verbose tests excluding `slow` and `integration`. Mark tests that require real model files with `@pytest.mark.slow`, and tests that require a live server with `@pytest.mark.integration`.
+
+For manual server smoke tests, remember `omlx serve` persists non-default CLI flags to `~/.omlx/settings.json`. Prefer a disposable base path such as `--base-path "$(mktemp -d /tmp/omlx-smoke.XXXXXX)"` for temporary runs with flags such as `--model-dir`, `--memory-guard`, or `--max-concurrent-requests`; use `--memory-guard aggressive` for light smoke runs rather than disabling the guard with `off`. If the Homebrew service is already running, prefer an isolated temporary server on an alternate port rather than stopping the service unless you specifically need to validate the service instance. Treat a temporary server as a persistent readiness-gated process, not a bounded command: inspect startup output immediately, probe its health or target endpoint as soon as it reports ready, run the dependent smoke request, and then stop it; never wait for the server process to exit or for a completion notification. When `brew services` is slow or hangs, manage the service directly with the user launch agent label/path (`homebrew.mxcl.omlx`, `~/Library/LaunchAgents/homebrew.mxcl.omlx.plist`) via `launchctl list`, `launchctl bootout`, and `launchctl bootstrap`. For unauthenticated smoke servers, unset `OMLX_API_KEY` before launching; if auth is enabled, the generated key is stored under `auth.api_key` in that temporary settings file. Restart any stopped Homebrew service afterward, and verify it on the configured `server.port` from `~/.omlx/settings.json` rather than assuming the default 8000. Query `/v1/models` before smoke requests and use the returned IDs; models stored under nested `owner/model` directories may be served by basename. For Responses API smoke tests, validate nested `.output[].content[].text` in addition to any convenience `.output_text` field. For lightweight image-generation smoke tests with local mlx-vlm models, use the core mlx-vlm dependency and at least two steps because `steps=1` can fail inside backend progress math rather than validating route behavior. For local image-edit smoke tests with large inputs, prefer multipart `/v1/images/edits` uploads (`-F image=@...`, plus `prompt`, `model`, `steps`, `guidance`, and `image_strength` fields) over JSON data URIs to avoid shell/base64 argument-size limits.
+
+## Code conventions
+
+- Keep the Apache 2.0 SPDX header at the top of Python source and test files.
+- Prefer dataclasses for configuration and request/response state where surrounding code already uses them.
+- Keep protocol-specific conversion in `omlx/api/` or `omlx/api/adapters/`; avoid mixing API wire-format logic into scheduler/cache internals.
+- Preserve async boundaries: FastAPI handlers and engine orchestration are async, while MLX generation is isolated through scheduler/engine abstractions.
+- Keep optional dependency behavior explicit. Extras such as `mcp`, `audio`, `grammar`, `image`, `modelscope`, and `paroquant` are intentionally separated; use availability helpers such as `omlx/utils/optional_deps.py` rather than importing heavy optional packages in core paths.
+- For Copilot CLI integration launches, keep `COPILOT_OFFLINE=true` so subagents do not fall back to GitHub-hosted services. The launcher persists the omlx provider into `~/.copilot/providers.json` (honoring `COPILOT_PROVIDERS_CONFIG`): merge into the existing file, clobber only entries whose provider name/id is `omlx`, preserve all foreign providers/models and unknown top-level keys, keep the file `0600`, and back up before rewriting (skip the write when content is unchanged).
+- When adding admin UI i18n keys, update every file under `apps/omlx-web/omlx_web/i18n/*.json` (including `pt-BR.json`) and run focused tests or JSON parsing checks that cover missing locale keys.
+- Admin templates ship with precompiled `apps/omlx-web/omlx_web/static/css/tailwind.css`; if you use new arbitrary Tailwind classes (for example `w-[...]`, `h-[...]`, `z-[...]`, or dynamic responsive grid classes), either rebuild and commit the CSS or prefer local semantic CSS in the template so installed pages do not lose layout.
+- For image generation/edit defaults, keep request-level `steps`/`guidance`/`image_strength` overrides ahead of manifest `default_*` values, and manifest values ahead of `omlx/image_registry.py` family defaults; resolve family defaults through canonical base-model aliases so every supported alias gets the same behavior, and cover changes with focused `tests/test_image_engine.py` cases. Family-level defaults must be backed by mlx-vlm model configuration or manifests rather than subjective manual results.
+- For mlx-vlm image editing, preserve each family’s documented input contract: FLUX.2 and Mage-Flow edit support multi-image requests, while Z-Image and ERNIE-Image require exactly one source image. Current mlx-vlm image families do not support masks. Route `image_strength` through request extras as both `strength` and `image_strength` so Z-Image and ERNIE-Image receive their respective names.
+- For VLM/chat media handling, prefer `omlx/utils/image.py`'s `extract_media_from_messages()` in engine paths so image, audio, and video handling stays aligned; keep `extract_images_from_messages()` as compatibility-only unless a three-value API is specifically required.
+- Keep Pixtral serving preprocessing MLX-resident via `return_tensors="mlx"` while preserving the image processor's default NumPy output for compatibility.
+- For VLM speculative decoding, keep standalone MTP drafter artifacts such as `gemma4_assistant`, `gemma4_unified_assistant`, and `qwen3_5_mtp` out of normal model discovery; they are loaded through parent VLM drafter paths and are not chat-capable models.
+- In SpecPrefill chunk selection, reduce chunk scores in one MLX operation and transfer the score vector once; per-chunk `.item()` calls serialize GPU work. Preserve deterministic Python tie ordering.
+- For model-family patches under `omlx/patches/`, keep changes narrow and covered by focused regression tests. These files mirror upstream behavior and can be brittle across dependency updates.
+- When a model-family patch changes checkpoint sanitization or quantization metadata, test a complete tiny synthetic checkpoint through the real loader with `strict=True`; helper-only conversion tests do not catch config normalization, module replacement, or unexpected/missing binding keys.
+- For affine PLE dequantization, promote mixed floating-point scales and biases to their shared MLX result dtype before calling `mx.dequantize`; its Metal kernel reads both buffers using one scalar type. Keep MXFP scales as `uint8` and preserve the precision of checkpoint metadata.
+- When changing cache, scheduler, streaming, adapters, or tool-call behavior, add focused tests for token accounting, finish reasons, cancellation/disconnect behavior, cache reuse/regression paths, and protocol output shape.
+- Keep streaming `RequestOutput.output_token_ids` empty until the terminal output to avoid quadratic cumulative-list copies; streaming consumers should use `new_token_ids`, while terminal and non-streaming consumers receive the complete token sequence.
+
+## Safety notes
+
+- The project targets Apple Silicon and MLX. Avoid adding torch-heavy dependencies to core paths unless they are guarded by an optional extra.
+- Do not enable Hugging Face `trust_remote_code` by default; tests assert the safer default.
+- Do not swallow MLX, GPU synchronization, cache corruption, model-loading, or settings-persistence errors with broad fallbacks. Surface errors through existing exception types in `omlx/exceptions.py`, route-level HTTP error mapping, or explicit user-facing warnings consistent with nearby code.
+- Do not run slow/integration/model-loading tests unless the task needs them and the environment has the required models or server.
+- Be careful with commands that build the macOS app or DMG; they can be expensive and may write large artifacts under `packaging/build/` and `packaging/dist/`.
diff --git a/README.fr.md b/README.fr.md
index 6d453364e6..596d4bdaca 100644
--- a/README.fr.md
+++ b/README.fr.md
@@ -405,5 +405,4 @@ Les contributions sont les bienvenues ! Voir le [Guide de contribution](docs/CON
- [mlx-vlm](https://github.com/Neywa-Labs/mlx-vlm) — inférence de modèles vision-langage sur Apple Silicon
- [vllm-mlx](https://github.com/waybarrios/vllm-mlx) — oMLX a démarré à partir de vllm-mlx v0.1.0 et a considérablement évolué avec le service multi-modèles, le cache KV à plusieurs niveaux, le support VLM avec cache paginé complet, un panneau d'admin, et une app dans la barre de menus macOS
- [venvstacks](https://venvstacks.lmstudio.ai) — couches d'environnements Python portables pour le bundle de l'app macOS
-- [mlx-embeddings](https://github.com/Blaizzy/mlx-embeddings) — support des modèles d'embedding sur Apple Silicon
- [dflash-mlx](https://github.com/bstnxbt/dflash-mlx) — décodage spéculatif par diffusion par blocs sur Apple Silicon
diff --git a/README.ja.md b/README.ja.md
index 7cb83bbe00..bf0450bdbf 100644
--- a/README.ja.md
+++ b/README.ja.md
@@ -402,5 +402,4 @@ apps/omlx-mac/Scripts/build.sh release --rebuild-donor
- [mlx-vlm](https://github.com/Neywa-Labs/mlx-vlm) - Apple Siliconでのビジョン言語モデル推論
- [vllm-mlx](https://github.com/waybarrios/vllm-mlx) - oMLXはvllm-mlx v0.1.0からスタートし、マルチモデルサービング、階層型KVキャッシュ、完全なページドキャッシュ対応のVLM、管理画面、macOSメニューバーアプリへと大きく進化しました
- [venvstacks](https://venvstacks.lmstudio.ai) - macOSアプリバンドルのためのポータブルPython環境レイヤリング
-- [mlx-embeddings](https://github.com/Blaizzy/mlx-embeddings) - Apple Silicon向けエンベディングモデルサポート
- [dflash-mlx](https://github.com/bstnxbt/dflash-mlx) - Apple Siliconでのブロック拡散 speculative decoding
diff --git a/README.ko.md b/README.ko.md
index b116d7b434..4b624904f4 100644
--- a/README.ko.md
+++ b/README.ko.md
@@ -310,8 +310,8 @@ mlx-lm에서 사용 가능한 모든 함수 호출 형식, JSON 스키마 검증
| LLM | [mlx-lm](https://github.com/ml-explore/mlx-lm)이 지원하는 모든 모델 |
| VLM | Qwen3.5 시리즈, GLM-4V, Pixtral 및 기타 [mlx-vlm](https://github.com/Neywa-Labs/mlx-vlm) 모델 |
| OCR | DeepSeek-OCR, DOTS-OCR, GLM-OCR |
-| 임베딩 | BERT, BGE-M3, ModernBERT, EmbeddingGemma 2 |
-| 리랭커 | ModernBERT, XLM-RoBERTa |
+| 임베딩 | BERT, BGE-M3, ModernBERT, EmbeddingGemma, EmbeddingGemma 2, Qwen3-Embedding, Qwen3-VL-Embedding, SigLIP (text only) via [mlx-vlm](https://github.com/Blaizzy/mlx-vlm) or native loaders |
+| 리랭커 | ModernBERT, XLM-RoBERTa, Qwen3-Reranker, Qwen3-VL-Reranker |
| Decision | Clef, Clef-Flash, OpenJev, Decision 3.0 (d3, d3-flash, d3-mini, d3-nano, d3-lite, d3-edge) |
## CLI 설정
@@ -446,7 +446,6 @@ apps/omlx-mac/Scripts/build.sh release --rebuild-donor
- [mlx-vlm](https://github.com/Neywa-Labs/mlx-vlm) - Apple Silicon에서의 비전-언어 모델 추론
- [vllm-mlx](https://github.com/waybarrios/vllm-mlx) - oMLX는 vllm-mlx v0.1.0에서 시작하여 멀티 모델 서빙, 계층형 KV 캐시, 페이지드 캐시를 완전 지원하는 VLM, 관리자 패널, macOS 메뉴 바 앱으로 크게 발전했습니다
- [venvstacks](https://venvstacks.lmstudio.ai) - macOS 앱 번들을 위한 포터블 Python 환경 레이어링
-- [mlx-embeddings](https://github.com/Blaizzy/mlx-embeddings) - Apple Silicon을 위한 임베딩 모델 지원
- [dflash-mlx](https://github.com/bstnxbt/dflash-mlx) - Apple Silicon에서의 블록 디퓨전 speculative decoding
- [MTPLX](https://github.com/youssofal/mtplx) - Lightning MTP의 verify-shape Metal 커널은 Youssof Altoukhi의 MTPLX를 기반으로 하며, depth-k 파이프라인도 여기서 영감을 받았습니다
- [mlx-serve](https://github.com/ddalcu/mlx-serve) - Qwen GDN·QSA 커널(하나는 mlx-serve의 mlxfast-challenge 포팅)과 Linux 헬퍼의 expert 커널·MLX CUDA 패치는 mlx-serve의 MIT 라이선스 코드를 바탕으로 수정되었습니다
diff --git a/README.md b/README.md
index b878d719b3..28a09d295c 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,8 @@ omlx start
# Optional: MCP (Model Context Protocol) support, then restart to load it
/opt/homebrew/opt/omlx/libexec/bin/pip install mcp
omlx restart
+
+# mlx-vlm image generation and editing support is included with oMLX.
```
### From Source
@@ -81,6 +83,10 @@ make install # Editable install with the web UI and native custom
make mcp # Optional: MCP support, restart `omlx serve` to load it
```
+Image generation and editing use the core `mlx-vlm` dependency. The retained
+`image` extra is a no-op compatibility alias; source and released installs do
+not need it.
+
Requires macOS 15.0+ (Sequoia), Python 3.11–3.13, and Apple Silicon (M1/M2/M3/M4/M5).
> **Note on native custom kernels:** GLM-5.2, MiniMax M3, and Qwen3.5 need them.
@@ -100,6 +106,9 @@ Requires macOS 15.0+ (Sequoia), Python 3.11–3.13, and Apple Silicon (M1/M2/M3/
> python -c "from omlx.custom_kernels import native_kernel_status; print(native_kernel_status())"
> ```
+Core installs include text, VLM, embedding, reranker, and mlx-vlm image
+generation/editing support. MCP remains optional via the `mcp` extra.
+
## Quickstart
### macOS App
@@ -123,7 +132,7 @@ omlx restart
omlx serve --model-dir ~/models
```
-The server discovers LLMs, VLMs, embedding models, and rerankers from subdirectories automatically. Any OpenAI-compatible client can connect to `http://localhost:8000/v1`. A built-in chat UI is also available at `http://localhost:8000/admin/chat`.
+The server discovers LLMs, VLMs, embedding models, rerankers, and image model manifests from subdirectories automatically. Any OpenAI-compatible client can connect to `http://localhost:8000/v1`. A built-in chat UI is also available at `http://localhost:8000/admin/chat`.
### Homebrew Service
@@ -148,7 +157,8 @@ Logs are written to two locations:
## Features
-Supports text LLMs, vision-language models (VLM), OCR models, embeddings, and rerankers on Apple Silicon.
+Supports text LLMs, vision-language models (VLM), OCR models, embeddings,
+rerankers, and mlx-vlm image generation/editing models on Apple Silicon.
### Admin Dashboard
@@ -181,7 +191,9 @@ NVIDIA GPUs running [omlx-cuda-helper](apps/omlx-cuda-helper/README.md).
### Vision-Language Models
-Run VLMs with the same continuous batching and tiered KV cache stack as text LLMs. Supports multi-image chat, base64/URL/file image inputs, and tool calling with vision context. MiMo V2.6 checkpoints with bundled sidecars also accept sampled-frame video and 24 kHz audio. Qwen3.5, Qwen3.6 and Qwen3.8 checkpoints (dense and MoE) accept native video input as base64 `video_url` / `input_video` data URIs; video needs OpenCV (`opencv-python-headless`). oQ conversion of official MiMo V2.6 checkpoints preserves image and audio support. OCR models (DeepSeek-OCR, DOTS-OCR, GLM-OCR) are auto-detected with optimized prompts.
+Run VLMs with the same continuous batching and tiered KV cache stack as text LLMs. Supports multi-image chat, base64/URL/file image inputs, and tool calling with vision context. MiMo V2.6 checkpoints with bundled sidecars also accept sampled-frame video and 24 kHz audio. Qwen3.5, Qwen3.6 and Qwen3.8 checkpoints (dense and MoE) accept native video input as base64 `video_url` / `input_video` data URIs; the fork also accepts `input_video: {"data": "", "format": "mp4"}` and inline video file attachments. Video needs OpenCV (`opencv-python-headless`) and cannot be combined with images or audio in one native-video request. Remote video URLs and local file paths are rejected. oQ conversion of official MiMo V2.6 checkpoints preserves image and audio support. OCR models (DeepSeek-OCR, DOTS-OCR, GLM-OCR) are auto-detected with optimized prompts.
+
+Qwen3.8-Flash-Next (`qwen4_exp`) PLE SSD offloading supports dense/raw-FP8, affine, and native MXFP4 embedding shards, including mixed storage layouts. Native MXFP4 uses packed U32 weights and U8 scales (4 bits, group size 32, no biases). The mmap path reads and dequantizes only requested rows, keeping the full PLE table off the GPU without converting the checkpoint.
### Tiered KV Cache (Hot + Cold)
@@ -204,9 +216,20 @@ Handles concurrent requests through mlx-lm's BatchGenerator. Max concurrent requ
Runs smaller context models with Claude Code by reporting the model's real context window to auto-compact instead of scaling token counts, and SSE keep-alive prevents read timeouts during long prefill.
+`omlx launch claude` enables [gateway model discovery](https://code.claude.com/docs/en/llm-gateway-protocol#model-discovery).
+Claude Code's `/model` picker lists visible chat models and exposed profiles with at least 48K context, or an unknown context limit.
+The launcher uses `/claude` as its Anthropic base path.
+That path advertises models with an `omlx-claude/` prefix because Claude Code filters out IDs without `claude` or `anthropic`.
+Messages and token-count requests on that path remove one prefix before normal model and profile resolution.
+The standard `/v1/models` catalog and Claude Desktop configuration stay unchanged.
+Use Claude Code v2.1.257 or later for discovery while nonessential traffic is disabled, as it is by default in the launcher.
+Context and auto-compact overrides remain process-wide, so the launcher uses the smallest known context limit among the initial model, configured tiers, and discoverable chat models.
+If the discovery preflight fails, the launcher warns and caps both overrides at the 48K discovery minimum.
+Models added after launch appear at the next Claude Code startup.
+
### Multi-Model Serving
-Load LLMs, VLMs, embedding models, and rerankers within the same server. Models are managed through a combination of automatic and manual controls:
+Load LLMs, VLMs, embedding models, rerankers, and image models within the same server. Models are managed through a combination of automatic and manual controls:
- **LRU eviction**: Least-recently-used models are evicted automatically when memory runs low.
- **Manual load/unload**: Interactive status badges in the admin panel let you load or unload models on demand.
@@ -227,6 +250,20 @@ Configure sampling parameters, chat template kwargs, TTL, model alias, model typ
+### LoRA adapters
+
+Download a Hugging Face PEFT LoRA adapter such as [harness-hub/LFM3-1.7B-pi](https://huggingface.co/harness-hub/LFM3-1.7B-pi), or place `adapter_config.json` and `adapter_model.safetensors` together in a folder under your model directories. Each adapter appears as its own model, named after its folder, without writing a merged copy of the base weights.
+
+oMLX matches `base_model_name_or_path` to an exact local repo ID first, then to the same model family. For example, `LiquidAI/LFM3-1.7B` matches `mlx-community/LFM3-1.7B-OptiQ-4bit`. If no base matches or several match, the **Models** tab and `GET /admin/api/models` explain how to resolve the issue. oMLX never guesses between candidates. Use [`PUT /admin/api/adapters/{adapter_id}/base`](docs/admin-api.md#models) to choose one.
+
+Adapter entries default to thinking off when the base template has a thinking switch. Applying an adapter adds memory and per-token compute. oMLX does not support DoRA, QA-LoRA, aLoRA, layer replication, `modules_to_save`, rank or alpha patterns, or `.bin`-only adapters. Adapter entries do not support cluster sync, Splash, remote prefill, MTP, or ANE prefill.
+
+LoRA targets must belong to numbered language-model layers. Vision and draft layers are not supported. If two adapter folders have the same name, the first keeps the model ID even if its adapter files cannot be loaded.
+
+Adapters must contain a standalone delta for the original base. Keep the ordinary PEFT export for initializers such as Gaussian or EVA. If the initializer changed the base weights, as PiSSA and OLoRA do, export a standard LoRA delta with PEFT before serving it on the original base.
+
+Routed-expert adapters can target `down_proj` on compatible MLX MoE bases, including quantized checkpoints. oMLX supports PEFT factors stored on the expert container for the `layers.N.mlp.experts.down_proj` and `layers.N.experts.down_proj` layouts when the base uses a supported MLX switch projection. It applies the delta only to selected experts without dequantizing or rewriting the base. Other expert parameter targets, including fused `gate_up_proj`, are not supported. Routed adapters cannot run with expert offload or DFlash.
+
### Built-in Chat
Chat directly with any loaded model from the admin panel. Supports conversation history, model switching, dark mode, reasoning model output, and image upload for VLM/OCR models.
@@ -246,6 +283,10 @@ Search and download models from HuggingFace directly in the admin dashboard, in
+### Model Upload Tracking
+
+Open **Models > Uploader** to view the upload queue, including jobs started before a page refresh or from another client. Tracking does not require revalidating your HuggingFace token. The queue refreshes automatically while the Uploader tab is open; **Refresh uploads** requests a fresh status without restarting an upload. If refresh fails, the last-known tasks remain visible with a warning. The animated upload indicator shows activity, not a byte percentage; pending jobs wait for the current upload to finish.
+
### Integrations
Set up OpenClaw, OpenCode, Codex, Hermes Agent, Copilot, Pi, Mistral Vibe, and DeepSeek Harness directly from the admin dashboard with a single click. No manual config editing required.
@@ -260,6 +301,141 @@ Set up OpenClaw, OpenCode, Codex, Hermes Agent, Copilot, Pi, Mistral Vibe, and D
Install [Mistral Vibe](https://github.com/mistralai/mistral-vibe) 2.26.0 or newer with `uv tool install mistral-vibe`, then run `omlx launch vibe` to select a local model, or `omlx launch vibe --model `. Vibe's provider, model, API-key reference and context window are configured for that process through its `VIBE_*` environment overrides. Existing `config.toml`, `VIBE_HOME`, tool permissions and cloud configuration are preserved. Pass Vibe arguments after `--`, for example `omlx launch vibe --model -- --resume`.
+#### OpenCode model switching
+
+OpenCode 2 is required. Run `omlx launch opencode` to register available chat
+models in its global configuration. Use `/models` to switch models, or pass `--model ` to
+choose the initial default. Without that flag, oMLX uses the saved OpenCode
+model, the server default, or the first available chat model, in that order.
+
+The launcher updates `opencode.jsonc` if it exists, otherwise `opencode.json`
+under `$XDG_CONFIG_HOME/opencode` or `~/.config/opencode`. It reads comments and
+trailing commas but rewrites the file as plain JSON with two-space indentation.
+The launcher attempts to back up the original file, including comments and
+formatting, before writing. An existing `.jsonc` filename is retained; plain JSON
+is valid JSONC. Other providers and manually configured models are preserved. Models no
+longer reported by oMLX remain in the file; remove them manually if needed. If
+discovery fails, the existing model list is preserved and an explicitly requested
+chat model is added as the default. If no model can be selected, OpenCode uses its
+existing default. The output limit leaves at least one quarter of the context
+window for input. When a refreshed model has no usable context, reasoning, or model-type
+metadata, existing values are preserved because they may be manually
+configured. The launcher warns that those values may be stale and retains
+configured tool capabilities. The config and backup files use Unix mode `0600`
+because they can contain an API key; existing ACLs may grant additional access.
+A malformed config stops the launch without replacing it.
+
+Audio-capable chat models also advertise audio input when oMLX recognizes their
+checkpoint's audio-encoder weights; this does not load the model. Stripped Gemma
+4 checkpoints without audio weights are not advertised as audio-capable.
+When audio detection is inconclusive (including older servers), manually
+configured audio input is preserved. The running server must use the updated
+code to report audio support; updating only the launcher is not sufficient.
+The launcher warns when the server does not expose this metadata.
+
+Changed existing configs receive a timestamped `.bak` file using the same
+best-effort backup-and-write helper as other integrations. If backup creation
+fails, oMLX warns and still writes the config. Concurrent edits are not protected,
+so avoid editing the file while launching. Unchanged configs are not rewritten.
+Symlinked, hard-linked, and non-owned config files are rejected.
+
+The launcher uses `$OPENCODE_CONFIG_DIR` instead of the default directory when
+set. Project, managed, and explicit OpenCode settings can override the global configuration.
+Only the current `providers` format is updated; legacy `provider` settings are
+left untouched and are not migrated.
+
+An already-running OpenCode 2 shared service may initially use a cached catalog;
+its file watcher can refresh the catalog later. Run `opencode reload` after the
+launcher writes the configuration, or pass
+`-- --standalone` to launch a private OpenCode server with the updated config.
+Reload rebuilds every loaded location and cancels pending permissions and forms
+in all projects. The launcher does not reload the shared service automatically.
+An explicitly selected `--server` may not use this local configuration at all.
+
+#### Codex model switching
+
+```bash
+omlx launch codex
+omlx launch codex_app
+# Optionally select the initial model; other models remain available:
+omlx launch codex --model your-model-id
+```
+
+Both integrations refresh a Codex model catalog from oMLX's available chat models,
+so you can switch models with the CLI's `/model` selector or the desktop app's
+model picker instead of selecting just one model before launch. Without `--model`,
+oMLX uses the saved Codex integration model when available, otherwise the
+oMLX default model (including its served alias). If neither is available,
+it falls back to the first chat model returned by the server (favorites first).
+The selected model starts loading in the background before Codex opens; launch
+does not wait for loading to finish. Warm-up request failures produce a warning
+without preventing launch, and normal inference can still load the model on demand.
+
+The catalog preserves served aliases and exposed profiles, includes unloaded
+models that oMLX can load on demand, and records each model's context window and
+text/image input support. Embedding, reranking, audio, and image-generation models
+are excluded when their type is available from the model status endpoint. If
+status is unavailable, the public model listing supplies context limits and input
+support defaults to text-only. Models with native reasoning-effort metadata
+advertise their supported levels. Models without it accept `low`, `medium`, and
+`high` as compatibility values; templates without effort controls ignore these
+values, and existing thinking defaults remain unchanged. This also lets Codex
+Desktop's low-effort background title generator prefer the launch-default model
+instead of loading another checkpoint solely for its effort metadata.
+
+Codex App configuration rewrites preserve user-set
+`model_auto_compact_token_limit` and `model_post_turn_compact_threshold_percent`
+in `config.toml`, including on subsequent launches. Set these to compact earlier
+if local memory constraints require extra headroom. These are global Codex
+settings, not per-model limits. Each catalog entry records the server's effective
+context window as both its context window and override ceiling, with an explicit
+auto-compaction threshold of 90% of that window (Codex's default). A lower
+user-set compaction limit can trigger earlier compaction. Relaunch Codex after
+changing server context limits; already-running sessions can retain older model
+metadata.
+
+Deferred tool loading is opt-in. Start the server with `--responses-tool-search`
+(or set `server.responses_tool_search` to `true` in `settings.json`), then relaunch
+Codex through oMLX to refresh its `supports_search_tool` catalog capability.
+Deferred function schemas stay out of the model prompt until discovered.
+Hosted `tool_search` runs BM25 search on the server (eight results by default);
+explicit `execution: "client"` searches are handed back to Codex. Loaded tools
+remain available through `previous_response_id` chains or replayed
+`tool_search_output` history. With the setting off, declared functions remain
+eagerly loaded and the catalog does not advertise search support.
+
+Requires a Codex version supporting
+[`model_catalog_json`](https://developers.openai.com/codex/config-reference/#model_catalog_json).
+The catalog is loaded at startup: relaunch through oMLX after adding or removing
+models, changing aliases, or updating model settings. Restart an already-running
+desktop app to apply the refreshed configuration. The CLI uses process-scoped
+provider/catalog overrides without changing your `config.toml`; the desktop
+integration backs up and updates that file as before. A custom `CODEX_HOME` is
+respected, and oMLX's generated catalogs do not overwrite other catalog files.
+
+#### Copilot CLI model switching
+
+Run `omlx launch copilot` or `omlx launch copilot --model your-model-id`.
+Like Codex, Copilot starts with the saved integration model, the oMLX default,
+or the first available chat model, and its `/model` picker can switch among
+the server's chat models. The launch-time provider registry includes per-model
+context limits, image support and available reasoning-effort levels; relaunch
+to refresh it after model changes. Explicitly selected models start loading in
+the background. When a context limit is unavailable, the registry uses a
+32,768-token fallback; this does not increase a model's actual capacity.
+
+oMLX runs Copilot in offline mode using the Responses API and stores its
+provider in the CLI's `providers.json` (`~/.copilot/providers.json`, or the
+file named by `COPILOT_PROVIDERS_CONFIG`). Relaunches refresh only the
+omlx-owned provider/model entries; providers and models you configured
+yourself are preserved, and the previous file is backed up before rewriting.
+The file is kept at `0600` because it contains the server's bearer token in
+plaintext, and it remains after Copilot exits so later CLI sessions can use
+the models. This requires a Copilot CLI version supporting `providers.json`.
+User-specified global context/reasoning overrides in CLI configuration can still
+take precedence over catalog metadata; the desktop integration clears these
+overrides so limits follow the selected model.
+
### Performance Benchmark
One-click benchmarking from the admin panel. Measures prefill (PP) and text generation (TG) tokens per second, with partial prefix cache hit testing for realistic performance numbers.
@@ -288,6 +464,8 @@ Drop-in replacement for OpenAI and Anthropic APIs. Supports streaming usage stat
| `POST /v1/embeddings` | Text embeddings |
| `POST /v1/rerank` | Document reranking |
| `POST /v1/systemone` | Typed decisions with decision models or chat models (TypeSafe System One) |
+| `POST /v1/images/generations` | Image generation |
+| `POST /v1/images/edits` | Image editing |
| `GET /v1/models` | List available models |
| `POST /v1/audio/transcriptions` | Speech-to-text, including speaker labels when supported |
| `POST /tokenize`, `POST /detokenize` | vLLM-compatible tokenizer API (also under `/v1`); embedding models take `prompt` only |
@@ -349,11 +527,332 @@ Models are auto-detected by type. You can also download models directly from the
| Type | Models |
|------|--------|
| LLM | Any model supported by [mlx-lm](https://github.com/ml-explore/mlx-lm) |
-| VLM | Qwen3.5 Series, GLM-4V, Pixtral, and other [mlx-vlm](https://github.com/Neywa-Labs/mlx-vlm) models |
+| VLM | Qwen3.5 Series, GLM-4V, Pixtral, Nemotron Nano Omni / Super VL / Bolt, and other [mlx-vlm](https://github.com/Neywa-Labs/mlx-vlm) models |
| OCR | DeepSeek-OCR, DOTS-OCR, GLM-OCR |
-| Embedding | BERT, BGE-M3, ModernBERT, EmbeddingGemma 2 |
-| Reranker | ModernBERT, XLM-RoBERTa |
+| Embedding | BERT, BGE-M3, ModernBERT, EmbeddingGemma, EmbeddingGemma 2, Qwen3-Embedding, Qwen3-VL-Embedding, SigLIP (text only) via [mlx-vlm](https://github.com/Blaizzy/mlx-vlm) or native loaders |
+| Reranker | ModernBERT, XLM-RoBERTa, Qwen3-Reranker, Qwen3-VL-Reranker |
| Decision | Clef, Clef-Flash, OpenJev, Decision 3.0 (d3, d3-flash, d3-mini, d3-nano, d3-lite, d3-edge) |
+| Image | mlx-vlm models: Qwen Image 2.1/base/Turbo, FLUX.2 Klein, Mage-Flow, Ming-Image 0.1 Design, ERNIE-Image, Z-Image, Ideogram 4, Bonsai |
+
+Embedding and reranker models load through mlx-vlm; the separate mlx-embeddings dependency is gone. NomicBERT checkpoints are no longer supported. SigLIP serves text embeddings only and rejects image inputs. Qwen3-VL-Embedding rejects inputs longer than 8192 tokens instead of truncating them.
+
+oMLX serves [Inkling 2 Mini](https://huggingface.co/thinkingmachines/Inkling-2-Mini)
+from the original `inkling2_loop` checkpoint. Keep the checkpoint files together
+in a model directory. Text, image input, and chat tool calls use the native
+checkpoint template and tokenizer. To use the bundled `mtp.safetensors` draft,
+enable **Lightning MTP** in Mini's model settings (`mtp_enabled: true`). It is
+off by default. Audio and video input are not supported for Mini.
+
+### Flint
+
+RecursiveSI Flint is a text-only MoE model served through native mlx-vlm
+(`model_type: flint`), with reasoning and GLM-style XML tool-call parsing.
+Discovery and integrations report text-only capabilities (`model_type: llm`)
+while retaining `engine_type: vlm` for loading; image, audio, and video inputs
+are not supported.
+oQ supports resident calibration and layer-streamed calibration on the original
+BF16 checkpoint, including routed/shared experts and normalized output-head
+inputs. See [oQ Quantization](docs/oQ_Quantization.md).
+
+### MiniCPM-V 4.7
+
+`MiniCPM-V-4.7-35B-A3B` requires the complete native `minicpmv4_7`
+implementation; it cannot be aliased to MiniCPM 4.6. The paired
+`MiniCPM-V-4.7-35B-A3B-DSpark` checkpoint is a drafter, not an independently
+served chat model. Support uses the existing chat, Anthropic Messages and
+Responses APIs; no audio or image/video generation capability is implied.
+
+The model and torch-free processor come from official **mlx-vlm**, pinned
+to [commit `4319ef2`](https://github.com/Blaizzy/mlx-vlm/commit/4319ef2c837b7226b758c3dd69edda51b7079785)
+(v0.7.10). The former full
+vendored implementation and source-hash installation bridge have been removed.
+This pin requires Python >=3.10, MLX >=0.32.4 and Transformers >=5.14;
+oMLX retains its existing MLX pin and Transformers upper bound.
+
+Small serving hooks in `omlx/patches/minicpm47.py` preserve request-local
+positions, padded-prefill behavior and the existing MiniCPM GDN normalization,
+including the official exact verifier. They also expose processor controls to
+mlx-vlm's signature-based input dispatcher and resolve legacy ViT-merger
+quantization paths through its per-model alias hook. The Qwen MTP constructor
+leaves foreign subclasses, including MiniCPM, responsible for their own heads.
+Vision packing uses the convolution's input dtype and the token embedding's
+floating output dtype, not packed quantized token-table storage.
+`omlx/speculative/minicpm_dspark.py` extends the official
+DSpark drafter with oMLX's proposal-probability/confidence transport and fixed
+paired-helper policy. The model, vision encoder, processor, checkpoint loading
+and speculative cache transactions remain upstream implementations.
+The official target uses normalized top-k routing; `norm_topk_prob=False`
+is not supported.
+
+Run `UV_PYTHON=python3.12 uv run --python python3.12 pytest tests/test_minicpm47.py tests/test_minicpm_pairing.py`
+for isolated, offline CPU compatibility checks. These exercise tiny strict
+HF/canonical/mixed-quantized checkpoints, processor/vision inputs, capture and
+cache rollback, and real oMLX greedy/sampled DSpark generation with cancellation
+and exception cleanup. Existing converted checkpoints and provenance checks
+are preserved; no reconversion or metadata changes are required.
+Tiny fixtures do not establish full-checkpoint or deployed GPU compatibility.
+
+The optional `mm_processor_kwargs` request field controls compression and
+slicing, separately from `chat_template_kwargs`:
+
+```json
+{
+ "mm_processor_kwargs": {
+ "downsample_mode": "4x",
+ "max_slice_nums": 36
+ }
+}
+```
+
+`downsample_mode` accepts `"4x"` or `"16x"`; `max_slice_nums` must be a positive
+integer. These controls can also be stored in per-model settings/profiles.
+In the admin UI, open **Model Settings > MiniCPM Media** to edit them.
+Choose **Default** for compression or clear the slicing limit to remove that
+override. Saving a MiniCPM profile with both controls unset records processor
+defaults explicitly rather than retaining previously applied media overrides.
+Non-null request values override model settings, then checkpoint/processor
+defaults. Omitted controls do not change existing defaults. The same effective
+compression mode is used for preprocessing, canvas positions and encoding.
+Advanced frame stacking (`stack_frames`) is deferred and rejected. Ordinary
+video retains the existing frame limit and can be combined with images.
+
+DSpark is explicitly opt-in through per-model `dflash_enabled: true` and
+`dflash_draft_model` pointing to its existing local paired checkpoint. The
+helper uses the target tokenizer and native sequential Markov proposals,
+proposal probabilities and confidence outputs. Verification is fixed-width,
+with at most eight proposals plus an anchor; confidence is observational, not
+an adaptive controller. Unsupported adaptive modes, sampled batches, stochastic
+XTC, constrained grammar decoding, sparse prefill, context-window truncation
+and private SSD drafter caching fail
+explicitly. Helper activation failures do not silently fall back to ordinary
+generation.
+
+Helper admission also checks source provenance, not just matching dimensions.
+Original Hugging Face local-directory downloads must retain their
+`.cache/huggingface/download/config.json.metadata`. Converted checkpoints
+may declare their source in `config.json`:
+`"omlx_source": {"repo_id": "...", "revision": "..."}`. The reviewed target
+source is `openbmb/MiniCPM-V-4.7-35B-A3B` at
+`4c7623a9326e0f74313bbc7292d852a9e3018a70`, and the helper source is
+`openbmb/MiniCPM-V-4.7-35B-A3B-DSpark` at
+`5facb75c251ffd524524a544c1f5fd97ba0d6c5c`.
+Conversion metadata is an explicit origin declaration, not a cryptographic
+certification of the trained tensors.
+
+DSpark requests re-prefill the complete prompt because ordinary KV prefix
+entries do not contain its target-layer capture history. Base serving without
+DSpark retains normal prefix-cache behavior. MiniCPM vision-feature caching is
+disabled until crop/position-equivalent reuse is proven. Original weights and
+configs are not rewritten; full checkpoint admission and installed-runtime
+validation require a separate memory-safe execution slot.
+
+### Nemotron multimodal models
+
+Support uses the official implementation merged in
+[Blaizzy/mlx-vlm#2528](https://github.com/Blaizzy/mlx-vlm/pull/2528),
+not a vendored architecture. The dependency pin above includes that merge and
+requires MLX 0.32.4, which oMLX already pins.
+
+| Family | Serving inputs | Native Lightning MTP |
+|--------|----------------|----------------------|
+| Nemotron-3 Nano Omni | Text, images, video; audio when the checkpoint includes `sound_config` | Only when native head tensors and configuration are present |
+| Nemotron-3.5 Super VL | Text, images, video | Bundled head; singleton and batched verification |
+| Nemotron-3.5 Bolt | Text, images, video | No bundled head |
+
+These models use the existing chat, Messages, and Responses APIs. Image and
+video inputs must use separate requests; each request accepts one video.
+Native paired-frame processing, odd-frame duplication, and pruning are retained,
+with an oMLX limit of 64 sampled frames. Pruned token IDs and embeddings share
+one retained-position map. API prompt usage reports the original processor token
+count; scheduling and cache positions use the compacted length. Cross-request
+prefix reuse is disabled for pruned video and native MTP because a KV entry alone
+cannot restore their complete media/head history. Audio identities are included
+in cache keys even when clips have identical lengths.
+
+Enable **Lightning MTP**, not an external assistant-drafter setting, for Super VL.
+Each request owns its native full-prompt head initialization. Batched verification
+commits at the earliest mismatch, stop, or token-budget boundary across the
+cohort, using the native recurrent-cache rollback transaction.
+Grammar-constrained and XTC late joins wait for the active native MTP cohort to
+finish; compatible requests still join its batched verification. This preserves
+live media-conditioned caches and queued tokens without text-only replay.
+Native full-prompt MTP requests cannot be requeued under memory pressure; the
+existing abort path applies rather than restarting without their media/head history.
+
+The existing `omlx.oq.quantize_oq_streaming()` Python API and admin oQ/oQe workflow accept floating-point
+sources and the native mixed ModelOpt NVFP4/FP8 source format (including NVIDIA's
+Super VL NVFP4 export). Per-expert global scales are folded before stacking,
+and Bolt's heterogeneous layer geometry is preserved. ModelOpt sensitivity
+measurement streams real source layers even when the full model fits in RAM.
+Existing MLX affine quants are serving inputs, not supported requantization
+sources. Exports remain multimodal: `text_only=True` is rejected before creating
+output. With `preserve_mtp=True`, the native head is exported to an associated
+`mtp/` sidecar using the official splitter's native format: ModelOpt FP8
+projections expand to floating point, while NVFP4 stays packed. The head is not
+oQe-calibrated, converted to the target's oQ recipe, or included in its
+bit-allocation budget. Size estimates count the exported sidecar
+once, including FP8 expansion and FP32 global scales. The official splitter can
+hold the complete head in memory.
+For sources larger than available RAM, oQe automatically streams native decoder
+layers from the original checkpoint for calibration instead of using a lossy
+proxy. Explicit `stream_calibration=True` also selects this path for smaller
+sources; heterogeneous Bolt layers retain their individual geometry and routing.
+Calibration uses the built-in text corpus; vision modules retain the weight-only
+oQ recipe rather than image/audio calibration. `oq_imatrix_report.json` records
+applied statistics and missing entries; this is not a quality claim.
+
+Coverage includes complete tiny native oQ/oQe checkpoint conversion, strict
+reload, mixed-source reconstruction, media alignment, and batched MTP lifecycle
+tests. It is not evidence of full-size checkpoint inference, conversion quality,
+or performance; those require separate model-specific validation.
+
+### Image model discovery and manifests
+
+Chat at `/admin/chat` includes image tools without a separate image tab.
+Ask which image models are available, request an image, or upload an image
+and ask for an edit. Text-only chat models can use these tools without
+receiving image bytes. Vision models retain their normal image inputs.
+Chat omits image tools when the request model reports no tool-calling support.
+Chat refreshes unavailable tool support before each new prompt, so loaded
+diffusion models can enable image tools without reopening the tab.
+Generated images appear inline with download and reuse controls. Reuse
+inserts an explicit image reference into the composer for a later edit.
+Branching a conversation updates references to copied images for the new chat.
+These references are identifiers, not URLs; references in assistant Markdown
+render as text, while the tool result contains the image preview.
+Chats and uploaded, generated, and MCP images are saved locally in the browser's
+IndexedDB storage. Reloaded images remain available for VLM prompts and edits.
+Branches own their copied images. Deleting a chat, truncating messages, or
+removing a variant removes images no longer owned by that history.
+If the history limit would discard an active chat, saving reports a warning
+instead; live messages and images remain available for export.
+Failed saves remain available for a later retry. If deleting or clearing history
+fails, messages received before cancellation remain available for export.
+Canceled inference does not restart. Clearing removes only the chats present
+when it starts, so chats created while storage is busy remain available.
+Download chats includes image bytes in the JSON archive; importing older JSON
+archives remains supported. Images stripped by older versions cannot be recovered.
+Temporary chats are not saved. Browser storage is not a backup and can be cleared
+by the browser or user. Export important chats, especially after a storage warning.
+Image inference has a ten-minute browser deadline. Stop prevents later
+tool results and follow-up chat requests, but does not guarantee immediate
+GPU preemption.
+
+Image generation and editing use the core mlx-vlm dependency. oMLX asks
+mlx-vlm whether each local diffusion checkpoint supports generation, editing,
+or both. Checkpoint metadata can identify models in renamed directories.
+The fork's alias registry does not restrict which families or tasks can be
+discovered.
+
+Requests override manifest sampling defaults. Otherwise mlx-vlm resolves
+sampling defaults from the loaded model. oMLX does not patch mlx-vlm request
+dataclasses or keep a separate family sampling-default table.
+With `size=auto`, generation uses mlx-vlm's default request size of 512×512;
+editing leaves size selection to the model. Explicit output sizes cannot
+exceed 4,194,304 pixels. Edit inputs use a private OS temporary directory
+per request, removed after inference or after a cancelled worker finishes.
+
+The fork retains `omlx-image-model.json` for explicit family or task
+declarations and per-checkpoint defaults. Add it in a model subdirectory
+to expose an mlx-vlm image model through `/v1/images/generations` or
+`/v1/images/edits`:
+
+```json
+{
+ "backend": "mlx-vlm",
+ "base_model": "flux2-klein-4b",
+ "task": ["generation", "edit"],
+ "model_path": ".",
+ "default_steps": 28,
+ "default_guidance": 3.5,
+ "default_image_strength": 0.4,
+ "estimated_size": 4294967296
+}
+```
+
+`model_path`, defaults, and `estimated_size` are optional. When
+`estimated_size` is omitted, oMLX uses the local `model_path` size when
+available, otherwise a conservative family estimate for memory accounting.
+`quantize` is not a valid image manifest setting because mlx-vlm loads the
+checkpoint's native weight format directly.
+
+Supported `base_model` aliases include FLUX.2 Klein 4B/9B/base/KV variants
+(generation and multi-image edit), Mage-Flow base/aligned/turbo and their edit
+variants, Z-Image and Z-Image Turbo, ERNIE-Image and ERNIE-Image Turbo,
+Ming-Image 0.1 Design (generation only), Ideogram 4 FP8, and Bonsai Ternary.
+The original `Ming-Image-0.1-Design` and quantized variants (such as
+`Ming-Image-0.1-Design-mxfp8`) are discovered without a manifest when placed
+under the model directory. Native sampling defaults are 12 steps and guidance 1.0;
+the output PNG retains its alpha channel. Z-Image
+and ERNIE-Image edit modes require
+exactly one source image; masks are not supported by the current mlx-vlm image
+families.
+
+Qwen Image **2.1 base and 2.1 Turbo** support generation and reference-image
+editing. Local multi-component checkpoints are detected from their 2.1
+pipeline/transformer/VAE configuration, even after renaming the directory;
+a Qwen-looking folder name alone is not sufficient. Older Qwen Image/Edit
+architectures are not included in this support. Explicit manifests can use
+`qwen-image-2.1` or `qwen-image-2.1-turbo`.
+
+The saved Turbo recipe has eight denoising steps and guidance 1.0. Schedule
+precedence is **request `sigmas` > checkpoint `sample_sigmas` > generated
+schedule from `steps`**. Setting only `steps`, including a manifest default,
+does not replace a saved checkpoint grid. Base checkpoints without saved
+grids keep 30 generation steps or 40 editing steps. Finite positive guidance
+overrides remain supported.
+
+Custom sigma grids are an API extension, not a chat tool option. Supply a
+nonempty, finite, strictly descending JSON array in `(0, 1]`, without terminal
+zero; the scheduler applies the checkpoint's shift settings and appends the
+terminal zero. For multipart edits, encode the `sigmas` form field as a JSON
+array, for example `[1, 0.8, 0.4]`. Each response image includes the backend's
+effective `steps` and `guidance` when available, plus its actual output size.
+Chat tool results include the actual result steps when the backend returns them.
+
+Qwen 2.1 editing conditions on all supplied reference images; the existing
+API/UI upload limits still apply. With automatic size, the backend selects
+the output aspect from the last resized reference. Qwen does not implement
+mask editing, `image_strength`, or an alternative `scheduler` selection;
+explicit unsupported options are rejected rather than ignored.
+
+The Qwen image compatibility patch temporarily backports a local mlx-vlm commit
+`9a200804c81b98fd420d1f8a064a6824cec76f4f`'s saved-grid,
+static-shift, effective-default/result, and nested processor-config fixes.
+It activates for recognized Qwen checkpoints before discovery probes or loading,
+refuses unknown upstream source shapes, and
+does nothing when the complete native fix is present. Remove the backport once
+oMLX's mlx-vlm pin contains the complete fix, retaining registry/API/UI wiring
+and regression tests. Full-checkpoint generation/edit validation and deployment
+are separate from weight-free tests and require a coordinated GPU memory
+budget; no checkpoint conversion or modification is needed.
+
+The source revision above is not yet published in the upstream repository.
+The checked-in hunks contain the exact before/after source and AST fingerprints,
+normalized across Python versions by omitting only empty type-parameter fields.
+Nonempty type parameters and other source changes still affect the fingerprint.
+The hunks can be verified without that local commit. Against a public
+`Blaizzy/mlx-vlm` checkout containing the original backport base
+`4f4634bb813c0298cb1467bed2e957526c71d0b4`, run:
+
+```bash
+uv run --python python3.12 python \
+ omlx/patches/mlx_vlm_qwen_image_compat/generate_backport.py \
+ --source-repo /path/to/mlx-vlm \
+ --verify-from-base
+```
+
+This reconstructs each target from the public base, verifies every hunk's unique
+context and the resulting AST fingerprint, and does not change any files.
+To regenerate the backport, a checkout containing the local source commit is
+required:
+
+```bash
+uv run --python python3.12 python \
+ omlx/patches/mlx_vlm_qwen_image_compat/generate_backport.py \
+ --source-repo /path/to/mlx-vlm \
+ --source-revision 9a200804c81b98fd420d1f8a064a6824cec76f4f
+```
## CLI Configuration
@@ -496,7 +995,6 @@ Contributions are welcome! See [Contributing Guide](docs/CONTRIBUTING.md) for de
- [mlx-vlm](https://github.com/Neywa-Labs/mlx-vlm) - Vision-language model inference on Apple Silicon
- [vllm-mlx](https://github.com/waybarrios/vllm-mlx) - oMLX started from vllm-mlx v0.1.0 and evolved significantly with multi-model serving, tiered KV caching, VLM with full paged cache support, an admin panel, and a macOS menu bar app
- [venvstacks](https://venvstacks.lmstudio.ai) - Portable Python environment layering for the macOS app bundle
-- [mlx-embeddings](https://github.com/Blaizzy/mlx-embeddings) - Embedding model support for Apple Silicon
- [dflash-mlx](https://github.com/bstnxbt/dflash-mlx) - Block diffusion speculative decoding on Apple Silicon
- [MTPLX](https://github.com/youssofal/mtplx) - Lightning MTP's verify-shape Metal kernels are powered by MTPLX by Youssof Altoukhi, which also inspired the depth-k pipeline
- [mlx-serve](https://github.com/ddalcu/mlx-serve) - Qwen GDN and QSA kernels (one via its mlxfast-challenge port) and the Linux helper's expert kernels and MLX CUDA patches are adapted from its MIT-licensed code
diff --git a/README.zh.md b/README.zh.md
index 03240839fa..27301133e1 100644
--- a/README.zh.md
+++ b/README.zh.md
@@ -411,7 +411,6 @@ apps/omlx-mac/Scripts/build.sh release --rebuild-donor
- [mlx-vlm](https://github.com/Neywa-Labs/mlx-vlm) - Apple Silicon 上的视觉语言模型推理
- [vllm-mlx](https://github.com/waybarrios/vllm-mlx) - oMLX 从 vllm-mlx v0.1.0 起步,经过大幅演进,增加了多模型服务、分层 KV 缓存、完整分页缓存支持的 VLM、管理后台和 macOS 菜单栏应用
- [venvstacks](https://venvstacks.lmstudio.ai) - macOS 应用包的便携 Python 环境分层
-- [mlx-embeddings](https://github.com/Blaizzy/mlx-embeddings) - Apple Silicon 嵌入模型支持
- [dflash-mlx](https://github.com/bstnxbt/dflash-mlx) - Apple Silicon 上的块扩散推测解码 (Block diffusion speculative decoding)
- [MTPLX](https://github.com/youssofal/mtplx) - Lightning MTP 的验证形态 Metal 内核由 Youssof Altoukhi 的 MTPLX 提供支持,同时也启发了 depth-k 流水线设计
- [mlx-serve](https://github.com/ddalcu/mlx-serve) - Qwen 的 GDN 与 QSA 内核(其一来自 mlx-serve 对 mlxfast-challenge 的移植)以及 Linux helper 的 expert 内核与 MLX CUDA 补丁改编自 mlx-serve 的 MIT 开源代码
diff --git a/apps/omlx-mac/Resources/Localizable.xcstrings b/apps/omlx-mac/Resources/Localizable.xcstrings
index 31830ab8d3..640c0ca1ab 100644
--- a/apps/omlx-mac/Resources/Localizable.xcstrings
+++ b/apps/omlx-mac/Resources/Localizable.xcstrings
@@ -4564,42 +4564,6 @@
}
}
},
- "about.credits.mlx_embeddings.role" : {
- "comment" : "About screen Credits row: role/description for the mlx-embeddings project",
- "extractionState" : "manual",
- "localizations" : {
- "de" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Embedding- und Reranker-Modelle auf MLX"
- }
- },
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Embedding + reranker models on MLX"
- }
- },
- "it" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Modelli di embedding + reranker su MLX"
- }
- },
- "ru" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Модели эмбеддингов и реранкеров на MLX"
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "MLX 上的 Embedding + 重排序模型"
- }
- }
- }
- },
"about.credits.mlx_lm.role" : {
"comment" : "About screen Credits row: role/description for the mlx-lm project",
"extractionState" : "manual",
@@ -11545,6 +11509,78 @@
}
}
},
+ "downloads.card.adapter_info" : {
+ "comment" : "Model card information banner. The placeholder is the Hugging Face repo ID of the base model.",
+ "extractionState" : "manual",
+ "localizations" : {
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "LoRA-Adapter für %@. Mit einem passenden Basismodell auf diesem Mac erscheint er als eigenständiges Modell."
+ }
+ },
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "LoRA adapter for %@. It appears as its own model on top of a matching base model on this Mac."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Adattatore LoRA per %@. Se su questo Mac è presente un modello di base compatibile, l'adattatore compare come modello separato."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "LoRA-адаптер для %@. Если на этом Mac есть подходящая базовая модель, адаптер отображается как отдельная модель."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ 的 LoRA 适配器。如果这台 Mac 上有匹配的基座模型,适配器会显示为单独的模型。"
+ }
+ }
+ }
+ },
+ "downloads.card.adapter_no_base" : {
+ "comment" : "Model card warning. The placeholder is the Hugging Face repo ID of the base model.",
+ "extractionState" : "manual",
+ "localizations" : {
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "LoRA-Adapter. Es wurde noch kein passendes Basismodell heruntergeladen. Lade %@ oder eine quantisierte Version davon herunter, damit der Adapter verfügbar wird."
+ }
+ },
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "LoRA adapter. No matching base model is downloaded yet. Download %@ or a quantized version of it and this adapter becomes available."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Adattatore LoRA. Non hai ancora scaricato un modello di base compatibile. Scarica %@ o una sua versione quantizzata per rendere disponibile l'adattatore."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "LoRA-адаптер. Подходящая базовая модель ещё не скачана. Скачайте %@ или её квантованную версию, чтобы адаптер стал доступен."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "LoRA 适配器。尚未下载匹配的基座模型。下载 %@ 或其量化版本后,即可使用此适配器。"
+ }
+ }
+ }
+ },
"downloads.card.cancel" : {
"comment" : "Button in the model card sheet that closes it without downloading",
"extractionState" : "manual",
@@ -12049,42 +12085,6 @@
}
}
},
- "downloads.card.lora_info" : {
- "comment" : "Note in the model card sheet when the repo is a LoRA adapter rather than a full model",
- "extractionState" : "manual",
- "localizations" : {
- "de" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Dies ist ein LoRA-Adapter. Nach dem Herunterladen in den erweiterten Einstellungen eines Basismodells auswählen."
- }
- },
- "en" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "This is a LoRA adapter. After it downloads, choose it in a base model's Advanced Settings."
- }
- },
- "it" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Questo è un adattatore LoRA. Dopo il download, sceglilo nelle impostazioni avanzate di un modello base."
- }
- },
- "ru" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "Это LoRA-адаптер. После загрузки выберите его в расширенных настройках базовой модели."
- }
- },
- "zh-Hans" : {
- "stringUnit" : {
- "state" : "translated",
- "value" : "这是一个 LoRA 适配器。下载后,请在基础模型的高级设置中选择它。"
- }
- }
- }
- },
"downloads.card.not_enough_space" : {
"comment" : "Warning beside the download buttons when the selection does not fit on disk",
"extractionState" : "manual",
diff --git a/apps/omlx-mac/Sources/AppView/Screens/AboutScreen.swift b/apps/omlx-mac/Sources/AppView/Screens/AboutScreen.swift
index 56e5e5665e..cb8b04ed3b 100644
--- a/apps/omlx-mac/Sources/AppView/Screens/AboutScreen.swift
+++ b/apps/omlx-mac/Sources/AppView/Screens/AboutScreen.swift
@@ -204,13 +204,6 @@ private struct CreditsSection: View {
comment: "About screen Credits row: role/description for the mlx-vlm project"),
url: URL(string: "https://github.com/Neywa-Labs/mlx-vlm")!
),
- Credit(
- name: "mlx-embeddings",
- role: String(localized: "about.credits.mlx_embeddings.role",
- defaultValue: "Embedding + reranker models on MLX",
- comment: "About screen Credits row: role/description for the mlx-embeddings project"),
- url: URL(string: "https://github.com/Blaizzy/mlx-embeddings")!
- ),
Credit(
name: "mlx-audio",
role: String(localized: "about.credits.mlx_audio.role",
diff --git a/apps/omlx-mac/Sources/AppView/Screens/ModelCardSheet.swift b/apps/omlx-mac/Sources/AppView/Screens/ModelCardSheet.swift
index f57aca6afb..e615c41679 100644
--- a/apps/omlx-mac/Sources/AppView/Screens/ModelCardSheet.swift
+++ b/apps/omlx-mac/Sources/AppView/Screens/ModelCardSheet.swift
@@ -188,8 +188,8 @@ struct ModelCardSheet: View {
errorView(message: message)
case .loaded(let dto):
metadataRow(dto: dto)
- if dto.isAdapter == true {
- loraBanner
+ if let adapter = dto.adapter {
+ adapterBanner(adapter)
}
tabBar
Divider().overlay(theme.groupBorder)
@@ -309,16 +309,20 @@ struct ModelCardSheet: View {
.foregroundStyle(theme.textSecondary)
}
- // MARK: LoRA adapter note
-
- private var loraBanner: some View {
- HStack(alignment: .top, spacing: 8) {
- Image(systemName: "info.circle.fill")
+ private func adapterBanner(_ adapter: ModelCardAdapter) -> some View {
+ let missingBase = adapter.localBaseIds?.isEmpty == true
+ let message = missingBase
+ ? String(localized: "downloads.card.adapter_no_base",
+ defaultValue: "LoRA adapter. No matching base model is downloaded yet. Download \(adapter.baseRepoId) or a quantized version of it and this adapter becomes available.",
+ comment: "Model card warning. The placeholder is the Hugging Face repo ID of the base model.")
+ : String(localized: "downloads.card.adapter_info",
+ defaultValue: "LoRA adapter for \(adapter.baseRepoId). It appears as its own model on top of a matching base model on this Mac.",
+ comment: "Model card information banner. The placeholder is the Hugging Face repo ID of the base model.")
+ return HStack(alignment: .top, spacing: 8) {
+ Image(systemName: missingBase ? "exclamationmark.triangle.fill" : "info.circle")
.font(.system(size: 12))
- .foregroundStyle(theme.textSecondary)
- Text(String(localized: "downloads.card.lora_info",
- defaultValue: "This is a LoRA adapter. After it downloads, choose it in a base model's Advanced Settings.",
- comment: "Note in the model card sheet when the repo is a LoRA adapter rather than a full model"))
+ .foregroundStyle(missingBase ? theme.warningText : theme.textSecondary)
+ Text(message)
.font(.omlxText(DesignTokens.FontSize.subheadline))
.foregroundStyle(theme.text)
.fixedSize(horizontal: false, vertical: true)
@@ -326,10 +330,11 @@ struct ModelCardSheet: View {
}
.padding(.horizontal, 12)
.padding(.vertical, 8)
- .background(theme.groupBg)
+ .background(missingBase ? theme.warningBg : theme.codeBg)
.overlay(
RoundedRectangle(cornerRadius: 6, style: .continuous)
- .strokeBorder(theme.textSecondary.opacity(0.25), lineWidth: 0.5)
+ .strokeBorder(missingBase ? theme.warningText.opacity(0.25) : theme.inputBorder,
+ lineWidth: 0.5)
)
.padding(.horizontal, 20)
.padding(.bottom, 10)
@@ -378,7 +383,7 @@ struct ModelCardSheet: View {
)
} else {
VStack(alignment: .leading, spacing: 0) {
- if target.source == .huggingFace, dto.isAdapter != true, dto.unsupportedReason == nil,
+ if target.source == .huggingFace, dto.unsupportedReason == nil,
dto.layout == "safetensors" || dto.layout == "gguf" {
Text(dto.layout == "safetensors" ? checkpointFilesHint : ggufFilesHint)
.font(.omlxText(DesignTokens.FontSize.subheadline))
@@ -567,28 +572,26 @@ struct ModelCardSheet: View {
.buttonStyle(.plain)
}
Spacer()
- Group {
- if let reason = dto.unsupportedReason, !reason.isEmpty {
- Text(reason)
- .font(.omlxText(DesignTokens.FontSize.subheadline))
- .foregroundStyle(theme.warningText)
- .fixedSize(horizontal: false, vertical: true)
- } else if target.source == .huggingFace {
- hfDownloadButtons(dto: dto)
- } else {
- Button {
- onDownload(target.repoId, nil)
- dismiss()
- } label: {
- Label(String(localized: "downloads.card.download",
- defaultValue: "Download",
- comment: "Primary button in the model card sheet that starts downloading the displayed model"),
- systemImage: "icloud.and.arrow.down")
- .labelStyle(.titleAndIcon)
- }
- .buttonStyle(.omlx(.primary))
- .keyboardShortcut(.defaultAction)
+ if let reason = dto.unsupportedReason, !reason.isEmpty {
+ Text(reason)
+ .font(.omlxText(DesignTokens.FontSize.subheadline))
+ .foregroundStyle(theme.warningText)
+ .fixedSize(horizontal: false, vertical: true)
+ } else if target.source == .huggingFace {
+ hfDownloadButtons(dto: dto)
+ } else {
+ Button {
+ onDownload(target.repoId, nil)
+ dismiss()
+ } label: {
+ Label(String(localized: "downloads.card.download",
+ defaultValue: "Download",
+ comment: "Primary button in the model card sheet that starts downloading the displayed model"),
+ systemImage: "icloud.and.arrow.down")
+ .labelStyle(.titleAndIcon)
}
+ .buttonStyle(.omlx(.primary))
+ .keyboardShortcut(.defaultAction)
}
}
.padding(.horizontal, 20)
diff --git a/apps/omlx-mac/Sources/Net/DTO/ModelCardDTO.swift b/apps/omlx-mac/Sources/Net/DTO/ModelCardDTO.swift
index a6f532ecee..52ad7e2518 100644
--- a/apps/omlx-mac/Sources/Net/DTO/ModelCardDTO.swift
+++ b/apps/omlx-mac/Sources/Net/DTO/ModelCardDTO.swift
@@ -5,7 +5,6 @@
// All metadata fields are optional because:
// • `model_card` is always present (server normalizes empty to "")
// • MS doesn't surface `params` (server returns null for it)
-// • MS doesn't surface `is_adapter` at all (HF-only field)
// • Even on HF, some repos omit pipeline_tag or have zero downloads/likes
//
// Future tabs (Files, Tags) would decode `files` and `tags` here — left
@@ -35,11 +34,8 @@ struct ModelCardDTO: Decodable, Equatable, Sendable {
/// Lifetime like/star count from the upstream API.
let likes: Int?
- /// HF-only: true when the repo is a LoRA / PEFT adapter rather than
- /// a full model. The sheet renders a warning banner and hides the
- /// Download button so the user doesn't accidentally pull an adapter
- /// they can't run standalone.
- let isAdapter: Bool?
+ /// HF-only: non-nil when the repo is a LoRA adapter.
+ let adapter: ModelCardAdapter?
/// Per-file listing — name + size in bytes + server-formatted size.
/// Drives the Files tab. Always present for HF; MS returns the same
@@ -67,6 +63,13 @@ struct ModelCardDTO: Decodable, Equatable, Sendable {
let unsupportedReason: String?
}
+struct ModelCardAdapter: Decodable, Equatable, Sendable {
+ let baseRepoId: String
+ let rank: Int
+ /// An empty list means no base matched. Nil means the server did not report matches.
+ let localBaseIds: [String]?
+}
+
/// One entry in `ModelCardDTO.files`. `sizeFormatted` is already
/// display-ready ("4.2 GB", "1.5 MB"); never reformat client-side.
struct ModelCardFile: Decodable, Equatable, Sendable, Identifiable {
diff --git a/apps/omlx-mac/Tests/oMLXTests/Fixtures/stats-session.json b/apps/omlx-mac/Tests/oMLXTests/Fixtures/stats-session.json
index 05cf3e023a..a81a02c5f4 100644
--- a/apps/omlx-mac/Tests/oMLXTests/Fixtures/stats-session.json
+++ b/apps/omlx-mac/Tests/oMLXTests/Fixtures/stats-session.json
@@ -25,12 +25,6 @@
"commit": null,
"url": null
},
- "mlx-embeddings": {
- "name": "mlx-embeddings",
- "version": "0.1.0",
- "commit": null,
- "url": null
- },
"mlx-audio": {
"name": "mlx-audio",
"version": "0.4.3",
diff --git a/apps/omlx-mac/Tests/oMLXTests/ModelCardDTODecodeTests.swift b/apps/omlx-mac/Tests/oMLXTests/ModelCardDTODecodeTests.swift
index 03d7b0a75e..865fb7cd0e 100644
--- a/apps/omlx-mac/Tests/oMLXTests/ModelCardDTODecodeTests.swift
+++ b/apps/omlx-mac/Tests/oMLXTests/ModelCardDTODecodeTests.swift
@@ -64,9 +64,6 @@ final class ModelCardDTODecodeTests: XCTestCase {
}
func testDecodesFullHFMetadata() throws {
- // Production-shaped HF response — every metadata field populated.
- // Drives the sheet's badges (params/size/pipeline_tag), the
- // downloads / likes counters, and the LoRA-adapter warning.
let json = """
{
"repo_id": "mlx-community/Llama-3.2-3B-Instruct-4bit",
@@ -79,7 +76,7 @@ final class ModelCardDTODecodeTests: XCTestCase {
"size_formatted": "4.2 GB",
"downloads": 12500,
"likes": 234,
- "is_adapter": false
+ "adapter": null
}
""".data(using: .utf8)!
@@ -89,14 +86,10 @@ final class ModelCardDTODecodeTests: XCTestCase {
XCTAssertEqual(dto.sizeFormatted, "4.2 GB")
XCTAssertEqual(dto.downloads, 12500)
XCTAssertEqual(dto.likes, 234)
- XCTAssertEqual(dto.isAdapter, false)
+ XCTAssertNil(dto.adapter)
}
func testDecodesMSResponseWithoutHFOnlyFields() throws {
- // ModelScope returns the same envelope but omits `is_adapter`
- // entirely and always leaves `params`/`params_formatted` null
- // (see ms_downloader.py). Decoder must treat both as nil rather
- // than throwing.
let json = """
{
"model_card": "## A ModelScope model",
@@ -114,18 +107,45 @@ final class ModelCardDTODecodeTests: XCTestCase {
XCTAssertNil(dto.paramsFormatted)
XCTAssertEqual(dto.sizeFormatted, "8.1 GB")
XCTAssertEqual(dto.downloads, 4200)
- XCTAssertNil(dto.isAdapter,
- "MS responses omit is_adapter entirely; decoder must produce nil, not throw.")
+ XCTAssertNil(dto.adapter, "ModelScope responses omit adapter metadata.")
}
func testDecodesLoraAdapter() throws {
- // Adapter repos surface with `is_adapter: true` — the sheet's
- // warning banner hinges on this. Test it as an isolated case
- // so a server-side rename catches here, not via the larger
- // metadata test.
- let json = #"{"model_card": "...", "is_adapter": true}"#.data(using: .utf8)!
+ let json = """
+ {
+ "model_card": "...",
+ "adapter": {"base_repo_id": "LiquidAI/LFM3-1.7B", "rank": 32, "local_base_ids": []}
+ }
+ """.data(using: .utf8)!
+ let dto = try decoder.decode(ModelCardDTO.self, from: json)
+ let adapter = try XCTUnwrap(dto.adapter)
+ XCTAssertEqual(adapter.baseRepoId, "LiquidAI/LFM3-1.7B")
+ XCTAssertEqual(adapter.rank, 32)
+ XCTAssertEqual(adapter.localBaseIds, [])
+ }
+
+ func testDecodesLoraAdapterWithoutLocalBaseIds() throws {
+ let json = """
+ {"model_card": "...", "adapter": {"base_repo_id": "LiquidAI/LFM3-1.7B", "rank": 32}}
+ """.data(using: .utf8)!
+ let dto = try decoder.decode(ModelCardDTO.self, from: json)
+ let adapter = try XCTUnwrap(dto.adapter)
+ XCTAssertNil(adapter.localBaseIds)
+ }
+
+ func testDecodesLoraAdapterWithLocalBaseIds() throws {
+ let json = """
+ {
+ "model_card": "...",
+ "adapter": {
+ "base_repo_id": "LiquidAI/LFM3-1.7B",
+ "rank": 32,
+ "local_base_ids": ["mlx-community/LFM3-1.7B-OptiQ-4bit"]
+ }
+ }
+ """.data(using: .utf8)!
let dto = try decoder.decode(ModelCardDTO.self, from: json)
- XCTAssertEqual(dto.isAdapter, true)
+ XCTAssertEqual(dto.adapter?.localBaseIds, ["mlx-community/LFM3-1.7B-OptiQ-4bit"])
}
func testDecodesFilesList() throws {
diff --git a/apps/omlx-web/omlx_web/i18n/cs.json b/apps/omlx-web/omlx_web/i18n/cs.json
index 68c49eae8e..65cdb93c25 100644
--- a/apps/omlx-web/omlx_web/i18n/cs.json
+++ b/apps/omlx-web/omlx_web/i18n/cs.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "Velikost",
"models.manager.local_models": "Lokální modely",
"models.manager.models_count": "{count} modelů",
+ "models.manager.adapter_issues_heading": "Nedostupné adaptéry LoRA",
"models.manager.refresh": "Obnovit",
"models.manager.reload": "Znovu načíst",
"models.manager.reloading": "Znovu načítání…",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "Zobrazit na HuggingFace",
"models.detail.view_on_ms": "Zobrazit na ModelScope",
"models.detail.close": "Zavřít",
- "models.detail.lora_info": "LoRA adaptér: vyberte ho v pokročilých nastaveních modelu",
+ "models.detail.adapter_info": "Adaptér LoRA pro {base}. Na tomto Macu se zobrazí jako samostatný model, pokud je k dispozici odpovídající základní model.",
+ "models.detail.adapter_no_base": "Adaptér LoRA. Odpovídající základní model zatím není stažený. Stáhněte {base} nebo jeho kvantizovanou verzi a adaptér bude k dispozici.",
"models.detail.cancel": "Zrušit",
"models.detail.download_all": "Stáhnout vše",
"models.detail.download_selected": "Stáhnout vybrané",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "Opravdu chcete smazat CELOU historii chatů? Tuto akci nelze vrátit zpět.",
"chat.error.incorrect_api_key": "API klíč není správný. Zadejte jej znovu.",
"chat.error.import_invalid": "Neplatný soubor s historií chatů.",
+ "chat.error.history_storage": "Historii chatu se nepodařilo uložit nebo obnovit. Nechte tuto kartu otevřenou a stáhněte si chaty, abyste zachovali neuloženou práci. Před obnovením stránky zkontrolujte úložiště prohlížeče a ostatní otevřené karty.",
"chat.upload_image": "Nahrát obrázek",
"chat.upload_document": "Přiložit dokument",
"chat.upload_audio": "Přiložit audio nebo video soubor",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "Načítání úloh nahrávání...",
+ "models.uploader.queue_error": "Nahrávání nelze aktualizovat. Poslední zobrazený stav může být zastaralý.",
+ "models.uploader.queue_empty": "Žádné úlohy nahrávání. Seznam se aktualizuje automaticky.",
+ "models.uploader.queue_refresh": "Obnovit nahrávání",
+ "models.uploader.queue_activity": "Probíhá nahrávání. Průběh v bajtech není k dispozici.",
+ "modal.model_settings.minicpm_media": "Média MiniCPM",
+ "modal.model_settings.minicpm_downsample_mode": "Vizuální komprese",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x používá méně vizuálních tokenů; 4x zachovává více detailů. Výchozí volba používá procesor modelu.",
+ "modal.model_settings.minicpm_max_slice_nums": "Maximum obrazových výřezů",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "Nastavte limit dělení obrázku (alespoň 1). Prázdná hodnota použije výchozí nastavení procesoru modelu.",
+ "modal.model_settings.moe_expert_offload_resident_25": "25 % v paměti",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12,5 % v paměti",
+ "modal.model_settings.model_type_image": "Obrázek",
+ "modal.model_settings.moe_expert_offload_resident_75": "75 % v paměti",
+ "modal.model_settings.moe_expert_offload_resident_50": "50 % v paměti",
+ "modal.model_settings.dflash_single_stream": "Pouze jeden proud: požadavky se zpracovávají postupně.",
+ "chat.image_download": "Stáhnout",
+ "chat.image_reuse": "Použít pro úpravy"
}
diff --git a/apps/omlx-web/omlx_web/i18n/de.json b/apps/omlx-web/omlx_web/i18n/de.json
index ca2b495efc..9920540aa5 100644
--- a/apps/omlx-web/omlx_web/i18n/de.json
+++ b/apps/omlx-web/omlx_web/i18n/de.json
@@ -1,4 +1,6 @@
{
+ "chat.image_download": "Herunterladen",
+ "chat.image_reuse": "Zum Bearbeiten verwenden",
"cluster.device.ssh_user": "SSH-Benutzername",
"cluster.device.ssh_user_help": "Geben Sie den Kurznamen des Benutzerkontos auf dem entfernten Computer ein. Lassen Sie das Feld leer, um den bei der Registrierung hinterlegten Benutzernamen oder die SSH-Konfiguration zu verwenden.",
"cluster.device.ssh_user_save": "SSH-Benutzernamen speichern",
@@ -234,6 +236,7 @@
"models.manager.table.size": "Größe",
"models.manager.local_models": "Lokale Modelle",
"models.manager.models_count": "{count} Modelle",
+ "models.manager.adapter_issues_heading": "Nicht verfügbare LoRA-Adapter",
"models.manager.refresh": "Aktualisieren",
"models.manager.reload": "Neu laden",
"models.manager.reloading": "Wird neu geladen...",
@@ -496,7 +499,8 @@
"models.detail.view_on_hf": "Auf HuggingFace anzeigen",
"models.detail.view_on_ms": "Auf ModelScope anzeigen",
"models.detail.close": "Schließen",
- "models.detail.lora_info": "LoRA-Adapter: in den erweiterten Einstellungen eines Modells auswählen",
+ "models.detail.adapter_info": "LoRA-Adapter für {base}. Wenn ein passendes Basismodell auf diesem Mac vorhanden ist, erscheint der Adapter als eigenes Modell.",
+ "models.detail.adapter_no_base": "LoRA-Adapter. Es wurde noch kein passendes Basismodell heruntergeladen. Laden Sie {base} oder eine quantisierte Version davon herunter, damit der Adapter verfügbar wird.",
"models.detail.cancel": "Abbrechen",
"models.detail.download_all": "Alle herunterladen",
"models.detail.download_selected": "Auswahl herunterladen",
@@ -2095,6 +2099,7 @@
"chat.confirm_clear_all": "Sind Sie sicher, dass Sie den gesamten Chat-Verlauf löschen möchten? Dies kann nicht rückgängig gemacht werden.",
"chat.error.incorrect_api_key": "API-Schlüssel ist falsch. Bitte geben Sie Ihren API-Schlüssel erneut ein.",
"chat.error.import_invalid": "Ungültige Chatverlaufsdatei.",
+ "chat.error.history_storage": "Der Chatverlauf konnte nicht gespeichert oder wiederhergestellt werden. Lassen Sie diesen Tab geöffnet und laden Sie Ihre Chats herunter, um ungespeicherte Arbeit zu sichern. Prüfen Sie vor dem Neuladen den Browserspeicher und andere offene Tabs.",
"chat.upload_image": "Bild hochladen",
"chat.upload_document": "Dokument anhängen",
"chat.upload_audio": "Audio- oder Videodatei anhängen",
@@ -2464,5 +2469,21 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "Upload-Aufgaben werden geladen...",
+ "models.uploader.queue_error": "Uploads konnten nicht aktualisiert werden. Der zuletzt angezeigte Status ist möglicherweise veraltet.",
+ "models.uploader.queue_empty": "Keine Upload-Aufgaben. Diese Liste wird automatisch aktualisiert.",
+ "models.uploader.queue_refresh": "Uploads aktualisieren",
+ "models.uploader.queue_activity": "Upload läuft. Ein Fortschritt auf Byte-Ebene ist nicht verfügbar.",
+ "modal.model_settings.minicpm_media": "MiniCPM-Medien",
+ "modal.model_settings.minicpm_downsample_mode": "Visuelle Komprimierung",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x verwendet weniger visuelle Tokens; 4x bewahrt mehr Details. Standard verwendet den Modellprozessor.",
+ "modal.model_settings.minicpm_max_slice_nums": "Maximale Bildausschnitte",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "Legen Sie die maximale Anzahl der Bildausschnitte fest (mindestens 1). Leer lassen, um den Standard des Modellprozessors zu verwenden.",
+ "modal.model_settings.dflash_single_stream": "Nur ein Stream: Anfragen werden nacheinander verarbeitet.",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12,5 % resident",
+ "modal.model_settings.moe_expert_offload_resident_25": "25 % resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50 % resident",
+ "modal.model_settings.moe_expert_offload_resident_75": "75 % resident",
+ "modal.model_settings.model_type_image": "Bild"
}
diff --git a/apps/omlx-web/omlx_web/i18n/en.json b/apps/omlx-web/omlx_web/i18n/en.json
index 2e374abed6..fe0dcf7874 100644
--- a/apps/omlx-web/omlx_web/i18n/en.json
+++ b/apps/omlx-web/omlx_web/i18n/en.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "Size",
"models.manager.local_models": "Local Models",
"models.manager.models_count": "{count} models",
+ "models.manager.adapter_issues_heading": "LoRA adapters that are not available",
"models.manager.refresh": "Refresh",
"models.manager.reload": "Reload",
"models.manager.reloading": "Reloading...",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "View on HuggingFace",
"models.detail.view_on_ms": "View on ModelScope",
"models.detail.close": "Close",
- "models.detail.lora_info": "LoRA adapter: choose it in a model's Advanced Settings",
+ "models.detail.adapter_info": "LoRA adapter for {base}. It appears as its own model on top of a matching base model on this Mac.",
+ "models.detail.adapter_no_base": "LoRA adapter. No matching base model is downloaded yet. Download {base} or a quantized version of it and this adapter becomes available.",
"models.detail.cancel": "Cancel",
"models.detail.download_all": "Download all",
"models.detail.download_selected": "Download selected",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "Are you sure you want to delete ALL chat history? This cannot be undone.",
"chat.error.incorrect_api_key": "API key is incorrect. Please re-enter your API key.",
"chat.error.import_invalid": "Invalid chat history file.",
+ "chat.error.history_storage": "Chat history could not be saved or restored. Keep this tab open and download your chats to preserve unsaved work. Check browser storage and other open tabs before reloading.",
"chat.upload_image": "Upload image",
"chat.upload_document": "Attach document",
"chat.upload_audio": "Attach audio or video file",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "Loading upload tasks...",
+ "models.uploader.queue_error": "Unable to refresh uploads. Last shown status may be out of date.",
+ "models.uploader.queue_empty": "No upload tasks. This list refreshes automatically.",
+ "models.uploader.queue_refresh": "Refresh uploads",
+ "models.uploader.queue_activity": "Upload in progress. Byte-level progress is unavailable.",
+ "modal.model_settings.minicpm_media": "MiniCPM Media",
+ "modal.model_settings.minicpm_downsample_mode": "Visual Compression",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x uses fewer visual tokens; 4x preserves more detail. Default uses the model processor.",
+ "modal.model_settings.minicpm_max_slice_nums": "Maximum Image Slices",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "Set the image slicing limit (at least 1). Leave empty for the model processor default.",
+ "modal.model_settings.dflash_single_stream": "Single-stream only: requests run one at a time.",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12.5% resident",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% resident",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% resident",
+ "modal.model_settings.model_type_image": "Image",
+ "chat.image_download": "Download",
+ "chat.image_reuse": "Reuse for editing"
}
diff --git a/apps/omlx-web/omlx_web/i18n/es.json b/apps/omlx-web/omlx_web/i18n/es.json
index 1f348f3017..8beb3a4fd3 100644
--- a/apps/omlx-web/omlx_web/i18n/es.json
+++ b/apps/omlx-web/omlx_web/i18n/es.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "Tamaño",
"models.manager.local_models": "Modelos Locales",
"models.manager.models_count": "{count} modelos",
+ "models.manager.adapter_issues_heading": "Adaptadores LoRA no disponibles",
"models.manager.refresh": "Actualizar",
"models.manager.reload": "Recargar",
"models.manager.reloading": "Recargando...",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "Ver en HuggingFace",
"models.detail.view_on_ms": "Ver en ModelScope",
"models.detail.close": "Cerrar",
- "models.detail.lora_info": "Adaptador LoRA: elígelo en la configuración avanzada de un modelo",
+ "models.detail.adapter_info": "Adaptador LoRA para {base}. Aparece como un modelo independiente si hay un modelo base compatible en este Mac.",
+ "models.detail.adapter_no_base": "Adaptador LoRA. Aún no se ha descargado ningún modelo base compatible. Descarga {base} o una versión cuantizada para que el adaptador esté disponible.",
"models.detail.cancel": "Cancelar",
"models.detail.download_all": "Descargar todo",
"models.detail.download_selected": "Descargar selección",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "¿Estás seguro de que quieres eliminar TODO el historial de chat? Esto no se puede deshacer.",
"chat.error.incorrect_api_key": "La clave API es incorrecta. Por favor ingrésala nuevamente.",
"chat.error.import_invalid": "Archivo de historial de chat no válido.",
+ "chat.error.history_storage": "No se pudo guardar o restaurar el historial. Mantén esta pestaña abierta y descarga tus chats para conservar el trabajo sin guardar. Revisa el almacenamiento del navegador y las otras pestañas antes de recargar.",
"chat.upload_image": "Subir imagen",
"chat.upload_document": "Attach document",
"chat.upload_audio": "Adjuntar archivo de audio o vídeo",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "Cargando tareas de subida...",
+ "models.uploader.queue_error": "No se pudieron actualizar las subidas. El último estado mostrado puede estar desactualizado.",
+ "models.uploader.queue_empty": "No hay tareas de subida. Esta lista se actualiza automáticamente.",
+ "models.uploader.queue_refresh": "Actualizar subidas",
+ "models.uploader.queue_activity": "Subida en curso. El progreso en bytes no está disponible.",
+ "modal.model_settings.minicpm_media": "Medios MiniCPM",
+ "modal.model_settings.minicpm_downsample_mode": "Compresión visual",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x usa menos tokens visuales; 4x conserva más detalles. La opción predeterminada usa el procesador del modelo.",
+ "modal.model_settings.minicpm_max_slice_nums": "Máximo de segmentos de imagen",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "Establece el límite de segmentación de imágenes (al menos 1). Déjalo vacío para usar el valor predeterminado del procesador del modelo.",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% resident",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12.5% resident",
+ "modal.model_settings.model_type_image": "Imagen",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% resident",
+ "modal.model_settings.dflash_single_stream": "Single-stream only: requests run one at a time.",
+ "chat.image_download": "Descargar",
+ "chat.image_reuse": "Reutilizar para editar"
}
diff --git a/apps/omlx-web/omlx_web/i18n/fr.json b/apps/omlx-web/omlx_web/i18n/fr.json
index a4550326d0..5d7da52c9f 100644
--- a/apps/omlx-web/omlx_web/i18n/fr.json
+++ b/apps/omlx-web/omlx_web/i18n/fr.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "Taille",
"models.manager.local_models": "Modèles locaux",
"models.manager.models_count": "{count} modèles",
+ "models.manager.adapter_issues_heading": "Adaptateurs LoRA indisponibles",
"models.manager.refresh": "Actualiser",
"models.manager.reload": "Recharger",
"models.manager.reloading": "Rechargement en cours...",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "Voir sur HuggingFace",
"models.detail.view_on_ms": "Voir sur ModelScope",
"models.detail.close": "Fermer",
- "models.detail.lora_info": "Adaptateur LoRA : choisissez-le dans les paramètres avancés d'un modèle",
+ "models.detail.adapter_info": "Adaptateur LoRA pour {base}. Il apparaît comme un modèle distinct si un modèle de base correspondant est présent sur ce Mac.",
+ "models.detail.adapter_no_base": "Adaptateur LoRA. Aucun modèle de base correspondant n'a encore été téléchargé. Téléchargez {base} ou une version quantifiée pour rendre cet adaptateur disponible.",
"models.detail.cancel": "Annuler",
"models.detail.download_all": "Tout télécharger",
"models.detail.download_selected": "Télécharger la sélection",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "Êtes-vous sûr(e) de vouloir supprimer TOUT l'historique de chat ? Cela ne peut pas être annulé.",
"chat.error.incorrect_api_key": "La clé API est incorrecte. Veuillez réentrer votre clé API.",
"chat.error.import_invalid": "Fichier d'historique de discussion invalide.",
+ "chat.error.history_storage": "L’historique n’a pas pu être enregistré ou restauré. Gardez cet onglet ouvert et téléchargez vos discussions pour préserver le travail non enregistré. Vérifiez le stockage du navigateur et les autres onglets avant de recharger.",
"chat.upload_image": "Télécharger une image",
"chat.upload_document": "Attach document",
"chat.upload_audio": "Joindre un fichier audio ou vidéo",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "Chargement des tâches d'envoi...",
+ "models.uploader.queue_error": "Impossible d'actualiser les envois. Le dernier état affiché peut être obsolète.",
+ "models.uploader.queue_empty": "Aucune tâche d'envoi. Cette liste s'actualise automatiquement.",
+ "models.uploader.queue_refresh": "Actualiser les envois",
+ "models.uploader.queue_activity": "Envoi en cours. La progression en octets n'est pas disponible.",
+ "modal.model_settings.minicpm_media": "Médias MiniCPM",
+ "modal.model_settings.minicpm_downsample_mode": "Compression visuelle",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x utilise moins de jetons visuels ; 4x préserve davantage de détails. L'option par défaut utilise le processeur du modèle.",
+ "modal.model_settings.minicpm_max_slice_nums": "Nombre maximal de découpes d'image",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "Définissez la limite de découpage des images (au moins 1). Laissez vide pour utiliser la valeur par défaut du processeur du modèle.",
+ "modal.model_settings.dflash_single_stream": "Single-stream only: requests run one at a time.",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12.5% resident",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% resident",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% resident",
+ "modal.model_settings.model_type_image": "Image",
+ "chat.image_download": "Télécharger",
+ "chat.image_reuse": "Réutiliser pour modifier"
}
diff --git a/apps/omlx-web/omlx_web/i18n/it.json b/apps/omlx-web/omlx_web/i18n/it.json
index 177313159c..539c7d865b 100644
--- a/apps/omlx-web/omlx_web/i18n/it.json
+++ b/apps/omlx-web/omlx_web/i18n/it.json
@@ -1,4 +1,26 @@
{
+ "chat.error.history_storage": "Impossibile salvare o ripristinare la cronologia della chat. Tieni aperta questa scheda e scarica le chat per non perdere il lavoro non salvato. Controlla lo spazio di archiviazione del browser e le altre schede aperte prima di ricaricare.",
+ "chat.image_download": "Scarica",
+ "chat.image_reuse": "Riutilizza per la modifica",
+ "modal.model_settings.dflash_single_stream": "Solo flusso singolo: le richieste vengono eseguite una alla volta.",
+ "modal.model_settings.minicpm_downsample_mode": "Compressione visiva",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x usa meno token visivi; 4x conserva più dettagli. L'impostazione predefinita usa il processore del modello.",
+ "modal.model_settings.minicpm_max_slice_nums": "Numero massimo di sezioni dell'immagine",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "Imposta il limite di sezioni dell'immagine (almeno 1). Lascia il campo vuoto per usare il valore predefinito del processore del modello.",
+ "modal.model_settings.minicpm_media": "Contenuti multimediali MiniCPM",
+ "modal.model_settings.model_type_image": "Immagine",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12,5% in memoria",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% in memoria",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% in memoria",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% in memoria",
+ "models.detail.adapter_info": "Adattatore LoRA per {base}. Appare come modello separato se su questo Mac è disponibile un modello di base compatibile.",
+ "models.detail.adapter_no_base": "Adattatore LoRA. Nessun modello di base compatibile è stato scaricato. Scarica {base} o una sua versione quantizzata per usare l'adattatore.",
+ "models.manager.adapter_issues_heading": "Adattatori LoRA non disponibili",
+ "models.uploader.queue_activity": "Caricamento in corso. L'avanzamento in byte non è disponibile.",
+ "models.uploader.queue_empty": "Nessun caricamento in coda. L'elenco si aggiorna automaticamente.",
+ "models.uploader.queue_error": "Impossibile aggiornare i caricamenti. L'ultimo stato mostrato potrebbe non essere aggiornato.",
+ "models.uploader.queue_loading": "Caricamento della coda in corso…",
+ "models.uploader.queue_refresh": "Aggiorna i caricamenti",
"cluster.device.ssh_user": "Nome utente SSH",
"cluster.device.ssh_user_help": "Inserisci il nome breve dell'account sul computer remoto. Lascia vuoto per usare il login registrato o la configurazione SSH.",
"cluster.device.ssh_user_save": "Salva nome utente SSH",
diff --git a/apps/omlx-web/omlx_web/i18n/ja.json b/apps/omlx-web/omlx_web/i18n/ja.json
index c66e45cbc7..6f2970cedb 100644
--- a/apps/omlx-web/omlx_web/i18n/ja.json
+++ b/apps/omlx-web/omlx_web/i18n/ja.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "サイズ",
"models.manager.local_models": "ローカルモデル",
"models.manager.models_count": "{count}個のモデル",
+ "models.manager.adapter_issues_heading": "利用できない LoRA アダプター",
"models.manager.refresh": "更新",
"models.manager.reload": "リロード",
"models.manager.reloading": "リロード中...",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "HuggingFaceで表示",
"models.detail.view_on_ms": "ModelScopeで表示",
"models.detail.close": "閉じる",
- "models.detail.lora_info": "LoRA アダプター: モデルの詳細設定で選択してください",
+ "models.detail.adapter_info": "{base} 用の LoRA アダプターです。この Mac に対応するベースモデルがあれば、別のモデルとして表示されます。",
+ "models.detail.adapter_no_base": "LoRA アダプターです。対応するベースモデルはまだダウンロードされていません。{base} またはその量子化版をダウンロードすると、このアダプターを利用できます。",
"models.detail.cancel": "キャンセル",
"models.detail.download_all": "すべてダウンロード",
"models.detail.download_selected": "選択したファイルをダウンロード",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "すべてのチャット履歴を削除しますか?この操作は元に戻せません。",
"chat.error.incorrect_api_key": "APIキーが正しくありません。再入力してください。",
"chat.error.import_invalid": "チャット履歴ファイルが無効です。",
+ "chat.error.history_storage": "チャット履歴を保存または復元できませんでした。未保存の内容を保護するため、このタブを開いたままチャットをダウンロードしてください。再読み込みの前にブラウザーのストレージと他のタブを確認してください。",
"chat.upload_image": "画像をアップロード",
"chat.upload_document": "Attach document",
"chat.upload_audio": "音声/動画ファイルを添付",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "アップロードタスクを読み込み中...",
+ "models.uploader.queue_error": "アップロード状態を更新できません。最後に表示された状態は古い可能性があります。",
+ "models.uploader.queue_empty": "アップロードタスクはありません。この一覧は自動的に更新されます。",
+ "models.uploader.queue_refresh": "アップロード状態を更新",
+ "models.uploader.queue_activity": "アップロード中です。バイト単位の進行状況は取得できません。",
+ "modal.model_settings.minicpm_media": "MiniCPM メディア",
+ "modal.model_settings.minicpm_downsample_mode": "視覚圧縮",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x は視覚トークンを削減し、4x はより多くの細部を保持します。デフォルトはモデルのプロセッサ設定を使用します。",
+ "modal.model_settings.minicpm_max_slice_nums": "画像スライス数の上限",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "画像分割の上限を設定します(1 以上)。空欄の場合はモデルのプロセッサのデフォルトを使用します。",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% resident",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12.5% resident",
+ "modal.model_settings.model_type_image": "画像",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% resident",
+ "modal.model_settings.dflash_single_stream": "Single-stream only: requests run one at a time.",
+ "chat.image_download": "ダウンロード",
+ "chat.image_reuse": "編集に再利用"
}
diff --git a/apps/omlx-web/omlx_web/i18n/ko.json b/apps/omlx-web/omlx_web/i18n/ko.json
index 44ab7fcf29..f3843dd9e1 100644
--- a/apps/omlx-web/omlx_web/i18n/ko.json
+++ b/apps/omlx-web/omlx_web/i18n/ko.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "크기",
"models.manager.local_models": "로컬 모델",
"models.manager.models_count": "{count}개 모델",
+ "models.manager.adapter_issues_heading": "사용할 수 없는 LoRA 어댑터",
"models.manager.refresh": "새로고침",
"models.manager.reload": "새로고침",
"models.manager.reloading": "새로고침 중...",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "HuggingFace에서 보기",
"models.detail.view_on_ms": "ModelScope에서 보기",
"models.detail.close": "닫기",
- "models.detail.lora_info": "LoRA 어댑터: 모델의 고급 설정에서 선택하세요",
+ "models.detail.adapter_info": "{base}용 LoRA 어댑터입니다. 이 Mac에 일치하는 기본 모델이 있으면 별도의 모델로 표시됩니다.",
+ "models.detail.adapter_no_base": "LoRA 어댑터입니다. 일치하는 기본 모델이 아직 다운로드되지 않았습니다. {base} 또는 해당 모델의 양자화 버전을 다운로드하면 이 어댑터를 사용할 수 있습니다.",
"models.detail.cancel": "취소",
"models.detail.download_all": "전부 받기",
"models.detail.download_selected": "선택한 파일 받기",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "모든 대화 기록을 삭제하시겠습니까? 이 작업은 되돌릴 수 없습니다.",
"chat.error.incorrect_api_key": "API 키가 올바르지 않습니다. 다시 입력해 주세요.",
"chat.error.import_invalid": "올바르지 않은 채팅 기록 파일입니다.",
+ "chat.error.history_storage": "채팅 기록을 저장하거나 복원하지 못했습니다. 저장되지 않은 작업을 보존하려면 이 탭을 열어 두고 채팅을 다운로드하세요. 새로고침하기 전에 브라우저 저장 공간과 다른 열린 탭을 확인하세요.",
"chat.upload_image": "이미지 업로드",
"chat.upload_document": "문서 첨부",
"chat.upload_audio": "오디오/비디오 파일 첨부",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "관리자 권한 PowerShell에서 이 Mac이 헬퍼에 연결할 수 있게 허용합니다.",
"cluster.cuda_guide.windows_run": "PowerShell에서 헬퍼를 시작합니다. 헬퍼가 이 Mac에 페어링을 요청하면 헬퍼 로그의 코드를 이 화면에 입력하세요. 이 Mac의 주소가 여러 개면 PC에서 닿는 주소로 바꾸세요.",
"cluster.cuda_guide.spark_run": "DGX OS에는 Docker와 NVIDIA Container Toolkit이 들어 있습니다. 헬퍼를 시작합니다. 이 화면에 나타나면 Pair를 누르고 헬퍼 로그의 코드를 입력하세요.",
- "cluster.device_card.helper_ready": "{name}에서 이 Mac 모델의 긴 프롬프트를 빠르게 처리할 수 있습니다."
+ "cluster.device_card.helper_ready": "{name}에서 이 Mac 모델의 긴 프롬프트를 빠르게 처리할 수 있습니다.",
+ "models.uploader.queue_loading": "업로드 작업을 불러오는 중...",
+ "models.uploader.queue_error": "업로드 상태를 새로 고칠 수 없습니다. 마지막으로 표시된 상태가 오래되었을 수 있습니다.",
+ "models.uploader.queue_empty": "업로드 작업이 없습니다. 이 목록은 자동으로 새로 고쳐집니다.",
+ "models.uploader.queue_refresh": "업로드 상태 새로 고침",
+ "models.uploader.queue_activity": "업로드 중입니다. 바이트 단위의 진행 상황은 제공되지 않습니다.",
+ "modal.model_settings.minicpm_media": "MiniCPM 미디어",
+ "modal.model_settings.minicpm_downsample_mode": "시각 압축",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x는 시각 토큰을 줄이고, 4x는 더 많은 세부 정보를 유지합니다. 기본값은 모델 프로세서 설정을 사용합니다.",
+ "modal.model_settings.minicpm_max_slice_nums": "최대 이미지 슬라이스 수",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "이미지 분할 한도를 설정합니다(최소 1). 비워 두면 모델 프로세서의 기본값을 사용합니다.",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% resident",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12.5% resident",
+ "modal.model_settings.model_type_image": "이미지",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% resident",
+ "modal.model_settings.dflash_single_stream": "Single-stream only: requests run one at a time.",
+ "chat.image_download": "다운로드",
+ "chat.image_reuse": "편집에 재사용"
}
diff --git a/apps/omlx-web/omlx_web/i18n/pt-BR.json b/apps/omlx-web/omlx_web/i18n/pt-BR.json
index 8486e68351..b020b380f5 100644
--- a/apps/omlx-web/omlx_web/i18n/pt-BR.json
+++ b/apps/omlx-web/omlx_web/i18n/pt-BR.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "Tamanho",
"models.manager.local_models": "Modelos Locais",
"models.manager.models_count": "{count} modelos",
+ "models.manager.adapter_issues_heading": "Adaptadores LoRA indisponíveis",
"models.manager.refresh": "Atualizar",
"models.manager.reload": "Recarregar",
"models.manager.reloading": "Recarregando...",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "Ver no HuggingFace",
"models.detail.view_on_ms": "Ver no ModelScope",
"models.detail.close": "Fechar",
- "models.detail.lora_info": "Adaptador LoRA: escolha-o nas configurações avançadas de um modelo",
+ "models.detail.adapter_info": "Adaptador LoRA para {base}. Ele aparece como um modelo separado se houver um modelo base correspondente neste Mac.",
+ "models.detail.adapter_no_base": "Adaptador LoRA. Nenhum modelo base correspondente foi baixado ainda. Baixe {base} ou uma versão quantizada para disponibilizar este adaptador.",
"models.detail.cancel": "Cancelar",
"models.detail.download_all": "Baixar tudo",
"models.detail.download_selected": "Baixar selecionados",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "Tem certeza de que deseja apagar TODO o histórico de conversa? Esta ação não pode ser desfeita.",
"chat.error.incorrect_api_key": "Chave de API incorreta. Insira novamente sua chave de API.",
"chat.error.import_invalid": "Arquivo de histórico de chat inválido.",
+ "chat.error.history_storage": "Não foi possível salvar ou restaurar o histórico. Mantenha esta aba aberta e baixe seus chats para preservar o trabalho não salvo. Verifique o armazenamento do navegador e as outras abas antes de recarregar.",
"chat.upload_image": "Enviar imagem",
"chat.upload_document": "Anexar documento",
"chat.upload_audio": "Anexar arquivo de áudio ou vídeo",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "Carregando tarefas de upload...",
+ "models.uploader.queue_error": "Não foi possível atualizar os uploads. O último status exibido pode estar desatualizado.",
+ "models.uploader.queue_empty": "Nenhuma tarefa de upload. Esta lista é atualizada automaticamente.",
+ "models.uploader.queue_refresh": "Atualizar uploads",
+ "models.uploader.queue_activity": "Upload em andamento. O progresso em bytes não está disponível.",
+ "modal.model_settings.minicpm_media": "Mídia MiniCPM",
+ "modal.model_settings.minicpm_downsample_mode": "Compressão visual",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x usa menos tokens visuais; 4x preserva mais detalhes. A opção padrão usa o processador do modelo.",
+ "modal.model_settings.minicpm_max_slice_nums": "Máximo de segmentos de imagem",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "Defina o limite de segmentação de imagens (pelo menos 1). Deixe em branco para usar o padrão do processador do modelo.",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% resident",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12.5% resident",
+ "modal.model_settings.model_type_image": "Imagem",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% resident",
+ "modal.model_settings.dflash_single_stream": "Single-stream only: requests run one at a time.",
+ "chat.image_download": "Baixar",
+ "chat.image_reuse": "Reutilizar para editar"
}
diff --git a/apps/omlx-web/omlx_web/i18n/ru.json b/apps/omlx-web/omlx_web/i18n/ru.json
index 0925e957eb..15c6ddd462 100644
--- a/apps/omlx-web/omlx_web/i18n/ru.json
+++ b/apps/omlx-web/omlx_web/i18n/ru.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "Размер",
"models.manager.local_models": "Локальные модели",
"models.manager.models_count": "Модели: {count}",
+ "models.manager.adapter_issues_heading": "Недоступные адаптеры LoRA",
"models.manager.refresh": "Обновить",
"models.manager.reload": "Перезагрузить",
"models.manager.reloading": "Перезагрузка...",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "Открыть на HuggingFace",
"models.detail.view_on_ms": "Открыть на ModelScope",
"models.detail.close": "Закрыть",
- "models.detail.lora_info": "LoRA-адаптер: выберите его в расширенных настройках модели",
+ "models.detail.adapter_info": "Адаптер LoRA для {base}. Если на этом Mac есть подходящая базовая модель, адаптер отображается как отдельная модель.",
+ "models.detail.adapter_no_base": "Адаптер LoRA. Подходящая базовая модель ещё не загружена. Загрузите {base} или её квантованную версию, чтобы адаптер стал доступен.",
"models.detail.cancel": "Отмена",
"models.detail.download_all": "Скачать всё",
"models.detail.download_selected": "Скачать выбранное",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "Вы уверены, что хотите удалить ВСЮ историю чатов? Это нельзя отменить.",
"chat.error.incorrect_api_key": "API-ключ неверен. Пожалуйста, введите его снова.",
"chat.error.import_invalid": "Недопустимый файл истории чатов.",
+ "chat.error.history_storage": "Не удалось сохранить или восстановить историю чатов. Не закрывайте эту вкладку и скачайте чаты, чтобы сохранить несохранённую работу. Перед перезагрузкой проверьте хранилище браузера и другие открытые вкладки.",
"chat.upload_image": "Загрузить изображение",
"chat.upload_document": "Прикрепить документ",
"chat.upload_audio": "Прикрепить аудио или видео файл",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "Загрузка списка задач...",
+ "models.uploader.queue_error": "Не удалось обновить состояние загрузок. Последнее показанное состояние может быть устаревшим.",
+ "models.uploader.queue_empty": "Нет задач загрузки. Этот список обновляется автоматически.",
+ "models.uploader.queue_refresh": "Обновить загрузки",
+ "models.uploader.queue_activity": "Идёт загрузка. Сведения о прогрессе в байтах недоступны.",
+ "modal.model_settings.minicpm_media": "Медиа MiniCPM",
+ "modal.model_settings.minicpm_downsample_mode": "Визуальное сжатие",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x использует меньше визуальных токенов; 4x сохраняет больше деталей. Значение по умолчанию определяется процессором модели.",
+ "modal.model_settings.minicpm_max_slice_nums": "Максимальное число фрагментов изображения",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "Задайте предел разбиения изображения (не менее 1). Оставьте поле пустым для значения по умолчанию процессора модели.",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% resident",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12.5% resident",
+ "modal.model_settings.model_type_image": "Изображение",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% resident",
+ "modal.model_settings.dflash_single_stream": "Single-stream only: requests run one at a time.",
+ "chat.image_download": "Скачать",
+ "chat.image_reuse": "Использовать для редактирования"
}
diff --git a/apps/omlx-web/omlx_web/i18n/zh-TW.json b/apps/omlx-web/omlx_web/i18n/zh-TW.json
index 00d1d25e84..4afcb3f7ad 100644
--- a/apps/omlx-web/omlx_web/i18n/zh-TW.json
+++ b/apps/omlx-web/omlx_web/i18n/zh-TW.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "大小",
"models.manager.local_models": "本機模型",
"models.manager.models_count": "{count} 個模型",
+ "models.manager.adapter_issues_heading": "無法使用的 LoRA 配接器",
"models.manager.refresh": "重新整理",
"models.manager.reload": "重新載入",
"models.manager.reloading": "重新載入中...",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "在 HuggingFace 上檢視",
"models.detail.view_on_ms": "在魔搭社區檢視",
"models.detail.close": "關閉",
- "models.detail.lora_info": "LoRA 轉接器:請在模型的進階設定中選擇",
+ "models.detail.adapter_info": "適用於 {base} 的 LoRA 配接器。如果這台 Mac 上有相符的基礎模型,此配接器會顯示為獨立的模型。",
+ "models.detail.adapter_no_base": "LoRA 配接器。尚未下載相符的基礎模型。下載 {base} 或其量化版本後即可使用此配接器。",
"models.detail.cancel": "取消",
"models.detail.download_all": "全部下載",
"models.detail.download_selected": "下載所選檔案",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "確定要刪除所有對話記錄嗎?此操作無法復原。",
"chat.error.incorrect_api_key": "API 金鑰不正確,請重新輸入。",
"chat.error.import_invalid": "無效的聊天記錄檔案。",
+ "chat.error.history_storage": "無法儲存或還原聊天記錄。請保持此分頁開啟並下載聊天記錄,以保留尚未儲存的內容。重新載入前請檢查瀏覽器儲存空間及其他開啟的分頁。",
"chat.upload_image": "上傳圖片",
"chat.upload_document": "附加文件",
"chat.upload_audio": "附加音訊/影片檔案",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "正在載入上傳工作...",
+ "models.uploader.queue_error": "無法重新整理上傳工作。上次顯示的狀態可能已過時。",
+ "models.uploader.queue_empty": "目前沒有上傳工作。此清單會自動重新整理。",
+ "models.uploader.queue_refresh": "重新整理上傳工作",
+ "models.uploader.queue_activity": "正在上傳。暫不提供位元組層級的進度。",
+ "modal.model_settings.minicpm_media": "MiniCPM 媒體",
+ "modal.model_settings.minicpm_downsample_mode": "視覺壓縮",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x 使用較少的視覺 token;4x 保留更多細節。預設選項使用模型處理器設定。",
+ "modal.model_settings.minicpm_max_slice_nums": "最大影像切片數",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "設定影像切片上限(至少為 1)。留空則使用模型處理器的預設值。",
+ "modal.model_settings.moe_expert_offload_resident_25": "25% resident",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "12.5% resident",
+ "modal.model_settings.model_type_image": "影像",
+ "modal.model_settings.moe_expert_offload_resident_75": "75% resident",
+ "modal.model_settings.moe_expert_offload_resident_50": "50% resident",
+ "modal.model_settings.dflash_single_stream": "Single-stream only: requests run one at a time.",
+ "chat.image_download": "下載",
+ "chat.image_reuse": "重新用於編輯"
}
diff --git a/apps/omlx-web/omlx_web/i18n/zh.json b/apps/omlx-web/omlx_web/i18n/zh.json
index 02b871c3ef..2790ebe001 100644
--- a/apps/omlx-web/omlx_web/i18n/zh.json
+++ b/apps/omlx-web/omlx_web/i18n/zh.json
@@ -234,6 +234,7 @@
"models.manager.table.size": "大小",
"models.manager.local_models": "本地模型",
"models.manager.models_count": "{count} 个模型",
+ "models.manager.adapter_issues_heading": "不可用的 LoRA 适配器",
"models.manager.refresh": "刷新",
"models.manager.reload": "重新加载",
"models.manager.reloading": "重新加载中…",
@@ -496,7 +497,8 @@
"models.detail.view_on_hf": "在 HuggingFace 上查看",
"models.detail.view_on_ms": "在魔搭社区查看",
"models.detail.close": "关闭",
- "models.detail.lora_info": "LoRA 适配器:请在模型的高级设置中选择",
+ "models.detail.adapter_info": "适用于 {base} 的 LoRA 适配器。如果这台 Mac 上有匹配的基础模型,此适配器会显示为独立的模型。",
+ "models.detail.adapter_no_base": "LoRA 适配器。尚未下载匹配的基础模型。下载 {base} 或其量化版本后即可使用此适配器。",
"models.detail.cancel": "取消",
"models.detail.download_all": "全部下载",
"models.detail.download_selected": "下载所选文件",
@@ -2095,6 +2097,7 @@
"chat.confirm_clear_all": "确定要删除所有对话历史吗?此操作无法撤销。",
"chat.error.incorrect_api_key": "API 密钥不正确,请重新输入。",
"chat.error.import_invalid": "无效的聊天记录文件。",
+ "chat.error.history_storage": "无法保存或恢复聊天记录。请保持此标签页打开并下载聊天记录,以保留尚未保存的内容。重新加载前请检查浏览器存储空间及其他打开的标签页。",
"chat.upload_image": "上传图像",
"chat.upload_document": "附加文档",
"chat.upload_audio": "附加音频/视频文件",
@@ -2464,5 +2467,23 @@
"cluster.cuda_guide.windows_firewall": "In PowerShell as administrator, let this Mac reach the helper.",
"cluster.cuda_guide.windows_run": "Start the helper in PowerShell. It asks this Mac to pair: type the code from its log on this page. If this Mac has more than one address, use the one the PC can reach.",
"cluster.cuda_guide.spark_run": "DGX OS comes with Docker and the NVIDIA Container Toolkit. Start the helper. It appears on this page: press Pair on it and type the code from its log.",
- "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac."
+ "cluster.device_card.helper_ready": "{name} can speed up long prompts for models on this Mac.",
+ "models.uploader.queue_loading": "正在加载上传任务...",
+ "models.uploader.queue_error": "无法刷新上传任务。上次显示的状态可能已过时。",
+ "models.uploader.queue_empty": "暂无上传任务。此列表会自动刷新。",
+ "models.uploader.queue_refresh": "刷新上传任务",
+ "models.uploader.queue_activity": "正在上传。暂不提供字节级进度。",
+ "modal.model_settings.minicpm_media": "MiniCPM 媒体",
+ "modal.model_settings.minicpm_downsample_mode": "视觉压缩",
+ "modal.model_settings.minicpm_downsample_mode_hint": "16x 使用更少的视觉 token;4x 保留更多细节。默认选项使用模型处理器设置。",
+ "modal.model_settings.minicpm_max_slice_nums": "最大图像切片数",
+ "modal.model_settings.minicpm_max_slice_nums_hint": "设置图像切片上限(至少为 1)。留空则使用模型处理器的默认值。",
+ "modal.model_settings.moe_expert_offload_resident_25": "常驻 25%",
+ "modal.model_settings.moe_expert_offload_resident_12_5": "常驻 12.5%",
+ "modal.model_settings.model_type_image": "图像",
+ "modal.model_settings.moe_expert_offload_resident_75": "常驻 75%",
+ "modal.model_settings.moe_expert_offload_resident_50": "常驻 50%",
+ "modal.model_settings.dflash_single_stream": "仅单流:请求逐个执行。",
+ "chat.image_download": "下载",
+ "chat.image_reuse": "重新用于编辑"
}
diff --git a/apps/omlx-web/omlx_web/routes.py b/apps/omlx-web/omlx_web/routes.py
index 197446989c..dc07c9baa5 100644
--- a/apps/omlx-web/omlx_web/routes.py
+++ b/apps/omlx-web/omlx_web/routes.py
@@ -164,6 +164,11 @@ async def chat_page(request: Request, is_admin: bool = Depends(require_admin)):
return templates.TemplateResponse(request, "chat.html", {"api_key": api_key or ""})
+@router.get("/imagine", response_class=HTMLResponse)
+async def imagine_page(request: Request, is_admin: bool = Depends(require_admin)):
+ return RedirectResponse(url="/admin/chat", status_code=307)
+
+
@router.get("/static/{path:path}")
async def admin_static(path: str):
"""Serve static files for admin panel (CSS, JS, fonts, logos, etc.)."""
diff --git a/apps/omlx-web/omlx_web/static/js/chat-history.js b/apps/omlx-web/omlx_web/static/js/chat-history.js
new file mode 100644
index 0000000000..db82927b20
--- /dev/null
+++ b/apps/omlx-web/omlx_web/static/js/chat-history.js
@@ -0,0 +1,328 @@
+// SPDX-License-Identifier: Apache-2.0
+const ChatHistory = (() => {
+ const databaseName = 'omlx-chat-history';
+ const legacyKey = 'omlx_chat_history';
+ const newId = () => Array.from(
+ crypto.getRandomValues(new Uint8Array(16)),
+ byte => byte.toString(16).padStart(2, '0'),
+ ).join('');
+ const copy = value => JSON.parse(JSON.stringify(value));
+ const request = operation => new Promise((resolve, reject) => {
+ operation.onsuccess = () => resolve(operation.result);
+ operation.onerror = () => reject(operation.error);
+ });
+ const completed = transaction => {
+ const result = new Promise((resolve, reject) => {
+ transaction.oncomplete = resolve;
+ transaction.onabort = () => reject(transaction.error || new Error('Chat history transaction aborted'));
+ });
+ result.catch(() => {});
+ return result;
+ };
+
+ async function withTransaction(db, stores, body) {
+ const tx = db.transaction(stores, 'readwrite');
+ const done = completed(tx);
+
+ try {
+ const result = await body(tx);
+ await done;
+
+ return result;
+ } catch (error) {
+ try {
+ tx.abort();
+ } catch (abortError) {
+ if (abortError.name !== 'InvalidStateError') console.error('Chat history abort failed:', abortError);
+ }
+ await done.catch(() => {});
+ throw error;
+ }
+ }
+
+ function validateMessageId(id) {
+ if (id == null || typeof id === 'string' || (typeof id === 'number' && Number.isFinite(id))) return;
+ throw new Error('Invalid chat history archive message ID');
+ }
+
+ function parseArchive(value) {
+ if (!Array.isArray(value) || value.some(chat =>
+ !chat || typeof chat.id !== 'string' || !chat.id || !Array.isArray(chat.messages)
+ || chat.messages.some(message => !message || typeof message.role !== 'string')
+ )) throw new Error('Invalid chat history archive');
+ for (const chat of value) {
+ for (const message of chat.messages) validateMessageId(message.id);
+ }
+ return copy(value);
+ }
+
+ function pack(chat) {
+ for (const message of chat.messages) validateMessageId(message.id);
+ const snapshot = copy(chat);
+ const attachments = [];
+ snapshot.messages.forEach((message, index) => {
+ const messageId = message.id == null || message.id === '' ? `legacy-${index}` : message.id;
+ const image = (url, kind, slot) => {
+ if (!url || !url.startsWith('data:')) return url;
+ const match = /^data:(image\/[a-zA-Z0-9.+-]+);base64,([A-Za-z0-9+/=\r\n]+)$/.exec(url);
+ if (!match) throw new Error('Invalid inline chat image');
+
+ const bytes = Uint8Array.from(atob(match[2]), char => char.charCodeAt(0));
+ const key = [chat.id, messageId, kind, slot];
+ attachments.push({ key, chatId: chat.id, bytes: bytes.buffer, mimeType: match[1] });
+
+ return { attachment: key };
+ };
+ if (message._images) {
+ message._images = message._images.map((url, slot) => image(url, 'tool', slot));
+ }
+ if (Array.isArray(message.content)) {
+ message.content = message.content.map((part, slot) => {
+ if (part.type === 'image_url') {
+ return { ...part, image_url: { ...part.image_url, url: image(part.image_url?.url || '', 'upload', slot) } };
+ }
+ if (part.type === 'file') {
+ return {
+ ...part,
+ file: {
+ filename: part.file?.filename || '',
+ mime_type: part.file?.mime_type || '',
+ data: '',
+ },
+ };
+ }
+
+ return part;
+ });
+ }
+ });
+ return { snapshot, attachments };
+ }
+
+ function dataUrl(attachment) {
+ const bytes = new Uint8Array(attachment.bytes);
+ let binary = '';
+ for (let offset = 0; offset < bytes.length; offset += 8192) {
+ binary += String.fromCharCode(...bytes.subarray(offset, offset + 8192));
+ }
+
+ return `data:${attachment.mimeType};base64,${btoa(binary)}`;
+ }
+
+ async function hydrate(chat, attachments) {
+ const snapshot = copy(chat);
+ const urls = new Map(attachments.map(attachment =>
+ [JSON.stringify(attachment.key), dataUrl(attachment)]
+ ));
+ const image = value => {
+ if (typeof value === 'string') return value;
+
+ const url = urls.get(JSON.stringify(value.attachment));
+ if (!url) throw new Error('A saved chat image is missing');
+
+ return url;
+ };
+ for (const message of snapshot.messages) {
+ if (message._images) message._images = message._images.map(image);
+ if (Array.isArray(message.content)) {
+ for (const part of message.content) {
+ if (part.type === 'image_url') part.image_url.url = image(part.image_url.url);
+ }
+ }
+ }
+ return snapshot;
+ }
+
+ class Store {
+ constructor({ indexedDB = globalThis.indexedDB, storage = globalThis.localStorage, onError = () => {}, limit = 100, name = databaseName } = {}) {
+ this.indexedDB = indexedDB;
+ this.storage = storage;
+ this.onError = onError;
+ this.limit = limit;
+ this.name = name;
+ this.revisions = new Map();
+ this.seen = new Set();
+ this.deleted = new Set();
+ this.generation = 0;
+ this.queue = Promise.resolve();
+ this.ready = this.open().catch(error => {
+ this.db?.close();
+ throw error;
+ });
+ }
+
+ async open() {
+ if (!this.indexedDB) throw new Error('IndexedDB is unavailable');
+ this.db = await new Promise((resolve, reject) => {
+ let blocked = false;
+ const opening = this.indexedDB.open(this.name, 1);
+ opening.onupgradeneeded = () => {
+ const db = opening.result;
+ db.createObjectStore('chats', { keyPath: 'id' });
+ db.createObjectStore('attachments', { keyPath: 'key' }).createIndex('chatId', 'chatId');
+ db.createObjectStore('metadata');
+ };
+ opening.onsuccess = () => {
+ if (blocked) opening.result.close();
+ else resolve(opening.result);
+ };
+ opening.onerror = () => reject(opening.error);
+ opening.onblocked = () => {
+ blocked = true;
+ reject(new Error('Chat history upgrade is blocked by another tab'));
+ };
+ });
+ this.db.onversionchange = () => {
+ this.db.close();
+ this.onError(new Error('Chat history changed in another tab. Reload this page.'));
+ };
+ this.db.onclose = () => this.onError(new Error('Chat history storage connection closed unexpectedly.'));
+ const legacy = this.storage.getItem(legacyKey);
+ this.epoch = await withTransaction(this.db, ['chats', 'attachments', 'metadata'], async tx => {
+ const metadata = tx.objectStore('metadata');
+ const marker = await request(metadata.get('migrated'));
+ const epoch = await request(metadata.get('epoch')) || newId();
+ metadata.put(epoch, 'epoch');
+ if (!marker) {
+ const migrated = legacy ? parseArchive(JSON.parse(legacy)).map(pack) : [];
+ for (const entry of migrated) {
+ const chats = tx.objectStore('chats');
+ if (!await request(chats.get(entry.snapshot.id))) {
+ chats.put({ id: entry.snapshot.id, revision: 1, chat: entry.snapshot });
+ for (const attachment of entry.attachments) tx.objectStore('attachments').put(attachment);
+ }
+ }
+ metadata.put(true, 'migrated');
+ }
+ return epoch;
+ });
+ if (legacy) this.storage.removeItem(legacyKey);
+ }
+
+ enqueue(action) {
+ const operation = this.queue.then(() => this.ready).then(action);
+ this.queue = operation.catch(() => {});
+ return operation;
+ }
+
+ load() {
+ return this.enqueue(async () => {
+ const tx = this.db.transaction(['chats', 'attachments', 'metadata']);
+ const done = completed(tx);
+ const records = request(tx.objectStore('chats').getAll());
+ const attachments = request(tx.objectStore('attachments').getAll());
+ const epoch = request(tx.objectStore('metadata').get('epoch'));
+ const [saved, images, currentEpoch] = await Promise.all([records, attachments, epoch]);
+ await done;
+ this.epoch = currentEpoch;
+ const result = [];
+ for (const record of saved) {
+ if (!record.chat) {
+ this.deleted.add(record.id);
+ continue;
+ }
+ this.revisions.set(record.id, record.revision);
+ result.push(await hydrate(record.chat, images.filter(image => image.chatId === record.id)));
+ }
+ return result;
+ });
+ }
+
+ async removeAttachments(tx, chatId) {
+ const store = tx.objectStore('attachments');
+ const keys = await request(store.index('chatId').getAllKeys(chatId));
+ for (const key of keys) store.delete(key);
+ }
+
+ save(chat, { replace = false, protectedIds = [] } = {}) {
+ const resolveProtectedIds = typeof protectedIds === 'function' ? protectedIds : () => protectedIds;
+ const entry = pack(chat);
+ this.seen.add(entry.snapshot.id);
+ const generation = this.generation;
+ return this.enqueue(async () => {
+ if (generation !== this.generation || this.deleted.has(entry.snapshot.id)) return false;
+ const result = await withTransaction(this.db, ['chats', 'attachments', 'metadata'], async tx => {
+ const chats = tx.objectStore('chats');
+ const epoch = await request(tx.objectStore('metadata').get('epoch'));
+ const existing = await request(chats.get(entry.snapshot.id));
+ if (replace && existing?.chat
+ && (Date.parse(existing.chat.updatedAt) || 0) >= (Date.parse(entry.snapshot.updatedAt) || 0)) {
+ return false;
+ }
+ if (epoch !== this.epoch || (existing && (!existing.chat
+ || (!replace && existing.revision !== this.revisions.get(entry.snapshot.id))))) {
+ return { kind: 'conflict', deleted: !!existing && !existing.chat };
+ }
+ const revision = (existing?.revision || 0) + 1;
+ const records = await request(chats.getAll());
+ const active = records.filter(record => record.chat && record.id !== entry.snapshot.id);
+ active.push({ id: entry.snapshot.id, revision, chat: entry.snapshot });
+ active.sort((a, b) =>
+ Number(!!b.chat.pinned) - Number(!!a.chat.pinned)
+ || (Date.parse(b.chat.updatedAt) || 0) - (Date.parse(a.chat.updatedAt) || 0)
+ );
+ const evicted = active.slice(this.limit);
+
+ const checkCapacity = () => {
+ const protectedChatIds = resolveProtectedIds();
+ if (evicted.some(record => record.id === entry.snapshot.id || protectedChatIds.includes(record.id))) {
+ throw new Error('Chat history is full. Close, unpin, or delete older chats before saving this conversation.');
+ }
+ };
+ checkCapacity();
+
+ await this.removeAttachments(tx, entry.snapshot.id);
+ chats.put({ id: entry.snapshot.id, revision, chat: entry.snapshot });
+ for (const attachment of entry.attachments) tx.objectStore('attachments').put(attachment);
+
+ for (const record of evicted) {
+ chats.put({ id: record.id, revision: record.revision + 1 });
+ await this.removeAttachments(tx, record.id);
+ }
+ checkCapacity();
+ tx.commit();
+ return { kind: 'saved', revision, evicted };
+ });
+ if (result === false) return false;
+ if (result.kind === 'conflict') {
+ if (result.deleted) this.deleted.add(entry.snapshot.id);
+
+ throw new Error('Chat history changed in another tab. Reload before saving this chat.');
+ }
+ this.revisions.set(entry.snapshot.id, result.revision);
+ for (const record of result.evicted) this.deleted.add(record.id);
+ return result.evicted.map(record => record.id);
+ });
+ }
+
+ delete(chatId) {
+ return this.enqueue(async () => {
+ await withTransaction(this.db, ['chats', 'attachments'], async tx => {
+ tx.objectStore('chats').put({ id: chatId, revision: 0 });
+ await this.removeAttachments(tx, chatId);
+ });
+ this.deleted.add(chatId);
+ });
+ }
+
+ clear() {
+ this.generation++;
+ const chatIds = new Set([...this.revisions.keys(), ...this.seen]);
+
+ return this.enqueue(async () => {
+ const epoch = newId();
+ await withTransaction(this.db, ['chats', 'attachments', 'metadata'], async tx => {
+ tx.objectStore('chats').clear();
+ tx.objectStore('attachments').clear();
+ tx.objectStore('metadata').put(epoch, 'epoch');
+ });
+ for (const id of chatIds) this.deleted.add(id);
+
+ this.epoch = epoch;
+ this.revisions.clear();
+ });
+ }
+ }
+
+ return { Store, parseArchive, pack, hydrate, newId };
+})();
diff --git a/apps/omlx-web/omlx_web/static/js/chat-image-tools.js b/apps/omlx-web/omlx_web/static/js/chat-image-tools.js
new file mode 100644
index 0000000000..346c299fb5
--- /dev/null
+++ b/apps/omlx-web/omlx_web/static/js/chat-image-tools.js
@@ -0,0 +1,267 @@
+// SPDX-License-Identifier: Apache-2.0
+const ChatImageTools = (() => {
+ const options = {
+ size: { type: 'string', minLength: 1 },
+ seed: { type: 'integer' },
+ steps: { type: 'integer', minimum: 1 },
+ guidance: { type: 'number' },
+ n: { type: 'integer', minimum: 1 },
+ output_format: { type: 'string', enum: ['png', 'jpeg', 'webp'] },
+ negative_prompt: { type: 'string' },
+ };
+ const registry = {
+ list_image_models: {
+ description: 'List available image models, their explicitly supported tasks and defaults. Discover models before generating or editing. Unknown tasks are not supported.',
+ properties: {},
+ required: [],
+ execute: async (_args, scope) => ({
+ content: JSON.stringify({ models: await discover(scope) }), images: [],
+ }),
+ },
+ generate_image: {
+ description: 'Generate images with an available image model. Omit optional parameters to preserve model defaults. Outputs include image_refs for subsequent edits. Never retry inference automatically.',
+ properties: { model: { type: 'string', minLength: 1 }, prompt: { type: 'string', minLength: 1 }, ...options },
+ required: ['model', 'prompt'],
+ execute: (args, scope) => infer(args, scope, false),
+ },
+ edit_image: {
+ description: 'Edit explicit image_refs from this conversation. Sources may be uploads or prior tool images. Never guess a reference, use a URL/path/base64, or edit an unfinished sibling call. Preserves sources and returns fresh images.',
+ properties: {
+ model: { type: 'string', minLength: 1 }, prompt: { type: 'string', minLength: 1 }, ...options,
+ image_refs: { type: 'array', items: { type: 'string', pattern: '^image:' }, minItems: 1 },
+ image_strength: { type: 'number', minimum: 0, maximum: 1 },
+ },
+ required: ['model', 'prompt', 'image_refs'],
+ execute: (args, scope) => infer(args, scope, true),
+ },
+ };
+
+ function owns(name) {
+ return Object.hasOwn(registry, name);
+ }
+
+ function definitions() {
+ return Object.entries(registry).map(([name, entry]) => ({
+ type: 'function',
+ function: {
+ name, description: entry.description,
+ parameters: {
+ type: 'object', properties: entry.properties,
+ required: entry.required, additionalProperties: false,
+ },
+ },
+ }));
+ }
+
+ function reference(chatId, messageId, kind, slot) {
+ return `image:${encodeURIComponent(chatId)}:${encodeURIComponent(messageId)}:${kind}:${slot}`;
+ }
+
+ function renderReference(href) {
+ if (!href.startsWith('image:')) return false;
+ const escaped = href.replace(/&/g, '&').replace(//g, '>');
+ return `${escaped}`;
+ }
+
+ function sources(chatId, messages) {
+ const found = new Map();
+ for (const msg of messages) {
+ if (!msg.id) continue;
+ if (msg.role === 'user' && Array.isArray(msg.content)) {
+ msg.content.forEach((part, slot) => {
+ if (part.type === 'image_url') {
+ found.set(reference(chatId, msg.id, 'upload', slot), part.image_url?.url || '');
+ }
+ });
+ }
+ if (msg.role === 'tool') {
+ const count = msg._images?.length || msg._imagesStripped || 0;
+ for (let slot = 0; slot < count; slot++) {
+ found.set(reference(chatId, msg.id, 'tool', slot), msg._images?.[slot] ?? '');
+ }
+ }
+ }
+ return found;
+ }
+
+ function project(msg, chatId, vision) {
+ if (msg.role === 'user' && Array.isArray(msg.content)) {
+ return msg.content.flatMap((part, slot) => {
+ if (part.type !== 'image_url') return [part];
+ const ref = reference(chatId, msg.id, 'upload', slot);
+ const note = { type: 'text', text: `[Image ${ref}${part.image_url?.url ? '' : ' unavailable after reload'}]` };
+ return vision && part.image_url?.url ? [note, part] : [note];
+ });
+ }
+ if (msg.role === 'tool' && (msg._images?.length || msg._imagesStripped)) {
+ const count = msg._images?.length || msg._imagesStripped;
+ const refs = Array.from({ length: count }, (_, slot) => reference(chatId, msg.id, 'tool', slot));
+ return `${msg.content || ''}\nImage references: ${refs.join(', ')}${msg._images?.length ? '' : ' (unavailable after reload)'}`;
+ }
+ return msg.content;
+ }
+
+ function rebaseReferences(messages, fromChatId, toChatId) {
+ const prefix = `image:${encodeURIComponent(fromChatId)}:`;
+ const refs = new Map([...sources(fromChatId, messages).keys()].map(ref => [
+ ref, `image:${encodeURIComponent(toChatId)}:${ref.slice(prefix.length)}`,
+ ]));
+ const rebase = text => text.replace(
+ /image:[^:\s]+:[^:\s]+:(?:upload|tool):\d+/g,
+ ref => refs.get(ref) || ref,
+ );
+ for (const msg of messages) {
+ for (const field of ['content', 'reasoning_content', '_thinking']) {
+ if (typeof msg[field] === 'string') msg[field] = rebase(msg[field]);
+ }
+ if (Array.isArray(msg.content)) {
+ for (const part of msg.content) {
+ if (part.type === 'text') part.text = rebase(part.text);
+ }
+ }
+ for (const tc of (msg.tool_calls || [])) {
+ tc.function.arguments = rebase(tc.function.arguments);
+ }
+ }
+ }
+
+ async function readJson(url, init, scope) {
+ scope.signal.throwIfAborted();
+ const response = await fetch(url, { ...init, signal: scope.signal });
+ let data;
+ try {
+ data = await response.json();
+ } catch (error) {
+ scope.signal.throwIfAborted();
+ throw new Error(`${url}: ${error.message}`);
+ }
+ scope.signal.throwIfAborted();
+ if (!response.ok) {
+ const detail = data.error?.message || data.detail || `HTTP ${response.status}`;
+ throw new Error(`${url}: ${typeof detail === 'string' ? detail : JSON.stringify(detail)}`);
+ }
+ return data;
+ }
+
+ async function discover(scope) {
+ const [publicData, statusData] = await Promise.all([
+ readJson('/v1/models', { headers: scope.headers }, scope),
+ readJson('/v1/models/status', { headers: scope.headers }, scope),
+ ]);
+ if (!Array.isArray(publicData.data) || !Array.isArray(statusData.models)) {
+ throw new Error('Invalid image model discovery response');
+ }
+ const canonical = new Map();
+ for (const model of statusData.models) {
+ if (typeof model.id === 'string') canonical.set(model.id, model);
+ }
+ const lookup = new Map(canonical);
+ for (const model of canonical.values()) {
+ if (model.model_alias && !lookup.has(model.model_alias)) {
+ lookup.set(model.model_alias, model);
+ }
+ }
+ const result = new Map();
+ for (const publicModel of publicData.data) {
+ const model = lookup.get(publicModel.id);
+ if (!model || (model.model_type !== 'image' && model.engine_type !== 'image')) continue;
+ const metadata = model.image_metadata || {};
+ const tasks = Array.isArray(model.tasks) && model.tasks.length ? model.tasks : metadata.tasks;
+ let entry = result.get(model.id);
+ if (!entry) {
+ const defaults = {};
+ for (const [key, value] of Object.entries(metadata)) {
+ if (key.startsWith('default_')) defaults[key] = value;
+ }
+ entry = {
+ id: model.id,
+ aliases: [],
+ tasks: [...new Set((Array.isArray(tasks) ? tasks : []).filter(task => task === 'generation' || task === 'edit'))],
+ defaults,
+ };
+ result.set(model.id, entry);
+ }
+ if (publicModel.id !== model.id && !entry.aliases.includes(publicModel.id)) entry.aliases.push(publicModel.id);
+ }
+ return [...result.values()];
+ }
+
+ function sourceBlob(ref, scope) {
+ const images = sources(scope.chatId, scope.messages);
+ if (!images.has(ref)) throw new Error(`Image source ${ref} is not in this chat's selected history`);
+ const url = images.get(ref);
+ if (!url) throw new Error(`Image source ${ref} is unavailable after reload or export`);
+ const match = /^data:(image\/[a-zA-Z0-9.+-]+);base64,([A-Za-z0-9+/=\r\n]+)$/.exec(url);
+ if (!match) throw new Error(`Image source ${ref} has no reusable inline image bytes`);
+ let binary;
+ try {
+ binary = atob(match[2]);
+ } catch {
+ throw new Error(`Image source ${ref} contains invalid inline image bytes`);
+ }
+ return new Blob([Uint8Array.from(binary, char => char.charCodeAt(0))], { type: match[1] });
+ }
+
+ async function infer(args, scope, edit) {
+ const body = { model: args.model, prompt: args.prompt, response_format: 'b64_json' };
+ for (const key of Object.keys(options)) {
+ if (args[key] !== undefined) body[key] = args[key];
+ }
+ let init;
+ if (edit) {
+ const form = new FormData();
+ for (const [key, value] of Object.entries(body)) form.append(key, String(value));
+ if (args.image_strength !== undefined) form.append('image_strength', String(args.image_strength));
+ args.image_refs.forEach((ref, index) => form.append('image', sourceBlob(ref, scope), `source-${index}`));
+ init = { method: 'POST', headers: scope.headers, body: form };
+ } else {
+ init = { method: 'POST', headers: { ...scope.headers, 'Content-Type': 'application/json' }, body: JSON.stringify(body) };
+ }
+ const data = await readJson(edit ? '/v1/images/edits' : '/v1/images/generations', init, scope);
+ if (!Array.isArray(data.data) || !data.data.length) throw new Error('Image inference returned no images');
+ const images = data.data.map(item => {
+ if (typeof item.b64_json !== 'string' || !item.b64_json) throw new Error('Image inference returned no inline image bytes');
+ const format = item.output_format || data.output_format || args.output_format || 'png';
+ if (!['png', 'jpeg', 'webp'].includes(format)) throw new Error('Image inference returned an unsupported format');
+ return `data:image/${format};base64,${item.b64_json}`;
+ });
+ const outputs = data.data.map((item, slot) => {
+ const output = { image_ref: reference(scope.chatId, scope.resultMessageId, 'tool', slot) };
+ for (const key of ['revised_prompt', 'steps', 'guidance', 'size', 'seed', 'output_format']) {
+ if (item[key] !== undefined) output[key] = item[key];
+ }
+ return output;
+ });
+ return { content: JSON.stringify({ model: args.model, outputs }), images };
+ }
+
+ async function execute(name, args, scope) {
+ if (!owns(name)) throw new Error(`Unknown image tool ${name}`);
+ const entry = registry[name];
+ if (!args || typeof args !== 'object' || Array.isArray(args)) throw new Error('Image tool arguments must be an object');
+ for (const key of entry.required) {
+ if (args[key] === undefined) throw new Error(`Image tool requires ${key}`);
+ }
+ for (const [key, value] of Object.entries(args)) {
+ if (!Object.hasOwn(entry.properties, key)) throw new Error(`Unsupported image option ${key}`);
+ const rule = entry.properties[key];
+ let valid;
+ if (rule.type === 'array') {
+ valid = Array.isArray(value) && value.length > 0
+ && value.every(ref => typeof ref === 'string' && ref.startsWith('image:'));
+ } else if (rule.type === 'integer') {
+ valid = Number.isInteger(value);
+ } else if (rule.type === 'number') {
+ valid = typeof value === 'number' && Number.isFinite(value);
+ } else {
+ valid = typeof value === 'string' && (!rule.minLength || value.trim().length >= rule.minLength);
+ }
+ if (!valid || (rule.minimum !== undefined && value < rule.minimum)
+ || (rule.maximum !== undefined && value > rule.maximum)
+ || (rule.enum && !rule.enum.includes(value))) throw new Error(`Invalid image option ${key}`);
+ }
+ return entry.execute(args, scope);
+ }
+
+ return { owns, definitions, reference, renderReference, sources, project, rebaseReferences, execute, discover };
+})();
diff --git a/apps/omlx-web/omlx_web/static/js/dashboard.js b/apps/omlx-web/omlx_web/static/js/dashboard.js
index b70220a5dd..a51b2665e1 100644
--- a/apps/omlx-web/omlx_web/static/js/dashboard.js
+++ b/apps/omlx-web/omlx_web/static/js/dashboard.js
@@ -254,7 +254,10 @@
// Models
models: [],
+ adapterIssues: [],
loadingModels: false,
+ _modelsLoadSeq: 0,
+ _modelsLoadPromise: null,
reloading: false,
// Sort state persists across refreshes/restarts via localStorage.
sortBy: localStorage.getItem('omlx_models_sort_by') || MODELS_SORT_DEFAULT.by,
@@ -655,9 +658,13 @@
uploadAllModels: [],
uploadOqModelsLoaded: false,
uploadTasks: [],
+ uploadTasksLoading: false,
+ uploadTasksLoaded: false,
+ uploadTasksError: '',
uploadError: '',
uploadSuccess: '',
_uploadRefreshTimer: null,
+ _uploadRefreshEnabled: false,
// Upload modal
uploadModalOpen: false,
uploadModalModelPath: '',
@@ -880,6 +887,7 @@
window.addEventListener('popstate', () => {
this.applyTabStateFromUrl();
+ this.refreshUploadTab();
this.settingsScrollToHash();
});
@@ -922,6 +930,7 @@
if (this.modelsTab === 'quantizer') {
loads.push(this.loadOQModels());
}
+ loads.push(this.refreshUploadTab());
if (this.msInitialized && this.msAvailable) {
loads.push(this.loadMSTasks());
}
@@ -936,6 +945,9 @@
['pending', 'loading', 'quantizing', 'saving'].includes(t.status));
if (hasOqActive) this.startOQRefresh();
} else {
+ if (this.mainTab !== 'models' || this.modelsTab !== 'uploader') {
+ this.stopUploadRefresh();
+ }
this.stopHFRefresh();
this.stopMSRefresh();
this.stopOQRefresh();
@@ -1179,10 +1191,7 @@
if (tab === 'quantizer') {
this.loadOQModels();
}
- if (tab === 'uploader') {
- if (!this.uploadOqModelsLoaded) this.loadUploadOqModels();
- this.loadUploadTasks();
- }
+ this.refreshUploadTab();
if (tab === 'downloader' && this.downloaderSource === 'recommended') {
this.loadRecommendations();
}
@@ -1610,21 +1619,50 @@
}
},
- async loadModels() {
+ loadModels() {
+ const loadSeq = ++this._modelsLoadSeq;
this.loadingModels = true;
- try {
- const response = await fetch('/admin/api/models');
- if (response.ok) {
- const data = await response.json();
- this.models = data.models || [];
- } else if (response.status === 401) {
- window.location.href = '/admin';
+
+ const request = (async () => {
+ try {
+ const response = await fetch('/admin/api/models');
+
+ if (loadSeq !== this._modelsLoadSeq) return;
+ if (response.ok) {
+ const data = await response.json();
+
+ if (loadSeq === this._modelsLoadSeq) {
+ this.models = data.models || [];
+
+ const issues = data.adapter_issues || [];
+
+ if (JSON.stringify(this.adapterIssues) !== JSON.stringify(issues)) {
+ this.adapterIssues = issues;
+ }
+ }
+ } else if (response.status === 401) {
+ window.location.href = '/admin';
+ }
+ } catch (err) {
+ if (loadSeq === this._modelsLoadSeq) {
+ console.error('Failed to load models:', err);
+ }
+ } finally {
+ if (loadSeq === this._modelsLoadSeq) {
+ this.loadingModels = false;
+ }
}
- } catch (err) {
- console.error('Failed to load models:', err);
- } finally {
- this.loadingModels = false;
- }
+ })();
+
+ const completion = request.then(() => {
+ if (loadSeq !== this._modelsLoadSeq) {
+ return this._modelsLoadPromise;
+ }
+ });
+
+ this._modelsLoadPromise = completion;
+
+ return completion;
},
async reloadModels() {
@@ -1802,6 +1840,11 @@
if (g) out.guided_grammar = g;
continue;
}
+ if (k === 'mm_processor_kwargs') {
+ const options = this.mmProcessorOptions(ms);
+ if (options || ms.is_minicpm_model) out[k] = options || {};
+ continue;
+ }
// Standard field: omit unset values entirely — the server
// treats absent universal keys as "reset to default" when
// the profile is applied (snapshot semantics).
@@ -2238,6 +2281,7 @@
buildModelSettingsState(model, settings) {
const s = settings || {};
const isDiffusion = this.isDiffusionModel(model);
+ const isMiniCPM = model?.config_model_type === 'minicpmv4_7';
const ctKwargEntries = this.buildCtKwargEntries(
s.chat_template_kwargs,
s.forced_ct_kwargs,
@@ -2331,6 +2375,11 @@
qwen35_ane_prefill_cpu_threads: s.qwen35_ane_prefill_cpu_threads ?? 8,
qwen35_ane_prefill_cpu_shared_resource: s.qwen35_ane_prefill_cpu_shared_resource !== false,
specprefill_enabled: s.specprefill_enabled || false,
+ mm_processor_kwargs: {
+ downsample_mode: '',
+ max_slice_nums: null,
+ ...s.mm_processor_kwargs,
+ },
specprefill_draft_model: s.specprefill_draft_model || '',
specprefill_keep_pct: s.specprefill_keep_pct ? String(s.specprefill_keep_pct) : '0.2',
specprefill_threshold: s.specprefill_threshold || null,
@@ -2341,7 +2390,8 @@
dflash_draft_quant_group_size: s.dflash_draft_quant_group_size || 64,
dflash_draft_window_size: s.dflash_draft_window_size ?? null,
dflash_block_size: s.dflash_block_size ?? null,
- dflash_verify_mode: s.dflash_verify_mode || 'adaptive',
+ dflash_verify_mode: s.dflash_verify_mode || (isMiniCPM ? 'dflash' : 'adaptive'),
+ is_minicpm_model: isMiniCPM,
dflash_compatible: model?.dflash_compatible !== false,
dflash_compatibility_reason: model?.dflash_compatibility_reason || '',
mtp_enabled: s.mtp_enabled || false,
@@ -2367,6 +2417,14 @@
};
},
+ mmProcessorOptions(ms = this.modelSettings) {
+ const options = { ...ms.mm_processor_kwargs };
+ for (const key of ['downsample_mode', 'max_slice_nums']) {
+ if (options[key] == null || options[key] === '') delete options[key];
+ }
+ return Object.keys(options).length ? options : null;
+ },
+
moeExpertOffloadResidentInvalid() {
const percent = Number(this.modelSettings.moe_expert_offload_resident_percent);
return (
@@ -3715,8 +3773,9 @@
? parseInt(ms.dflash_block_size)
: null,
dflash_verify_mode: ms.dflash_enabled
- ? (ms.dflash_verify_mode || 'adaptive')
+ ? (ms.dflash_verify_mode || (ms.is_minicpm_model ? 'dflash' : 'adaptive'))
: null,
+ mm_processor_kwargs: this.mmProcessorOptions(ms),
mtp_enabled: !!ms.mtp_enabled,
mtp_adaptive_max_depth: ms.mtp_enabled
? parseInt(ms.mtp_adaptive_max_depth || '3')
@@ -4103,7 +4162,7 @@
this.modelSettings.dflash_draft_quant_group_size = null;
this.modelSettings.dflash_draft_window_size = null;
this.modelSettings.dflash_block_size = null;
- this.modelSettings.dflash_verify_mode = 'adaptive';
+ this.modelSettings.dflash_verify_mode = this.modelSettings.is_minicpm_model ? 'dflash' : 'adaptive';
this.modelSettings.mtp_enabled = false;
this.modelSettings.mtp_adaptive_max_depth = '3';
this.modelSettings.trust_remote_code = false;
@@ -8598,20 +8657,46 @@
}
},
+ async refreshUploadTab() {
+ if (this.mainTab !== 'models' || this.modelsTab !== 'uploader') {
+ this.stopUploadRefresh();
+ return;
+ }
+ this.startUploadRefresh();
+ const loads = [this.loadUploadTasks()];
+ if (!this.uploadOqModelsLoaded) loads.push(this.loadUploadOqModels());
+ await Promise.all(loads);
+ },
+
async loadUploadTasks() {
+ if (this.uploadTasksLoading) return;
+ this.uploadTasksLoading = true;
+ if (this._uploadRefreshTimer !== null) {
+ clearTimeout(this._uploadRefreshTimer);
+ this._uploadRefreshTimer = null;
+ }
try {
const response = await fetch('/admin/api/upload/tasks');
- if (response.ok) {
- const data = await response.json();
- this.uploadTasks = data.tasks || [];
- const hasActive = this.uploadTasks.some(t =>
- ['pending', 'uploading'].includes(t.status));
- if (!hasActive) {
- this.stopUploadRefresh();
- }
+ if (!response.ok) {
+ this.uploadTasksError = `${window.t('models.uploader.queue_error')} (HTTP ${response.status})`;
+ return;
}
+ const data = await response.json();
+ if (!data || !Array.isArray(data.tasks) || !data.tasks.every(task =>
+ task && typeof task.task_id === 'string' &&
+ typeof task.model_name === 'string' &&
+ ['pending', 'uploading', 'completed', 'failed', 'cancelled'].includes(task.status))) {
+ throw new Error('Invalid upload task response');
+ }
+ this.uploadTasks = data.tasks;
+ this.uploadTasksLoaded = true;
+ this.uploadTasksError = '';
} catch (err) {
+ this.uploadTasksError = window.t('models.uploader.queue_error');
console.error('Failed to load upload tasks:', err);
+ } finally {
+ this.uploadTasksLoading = false;
+ if (this._uploadRefreshEnabled) this.startUploadRefresh();
}
},
@@ -8634,15 +8719,25 @@
},
startUploadRefresh() {
- this.stopUploadRefresh();
- this._uploadRefreshTimer = setInterval(() => {
- this.loadUploadTasks();
- }, 2000);
+ if (this.mainTab !== 'models' || this.modelsTab !== 'uploader') {
+ this.stopUploadRefresh();
+ return;
+ }
+ this._uploadRefreshEnabled = true;
+ if (this._uploadRefreshTimer !== null || this.uploadTasksLoading) return;
+ const hasActive = this.uploadTasks.some(task =>
+ ['pending', 'uploading'].includes(task.status));
+ const delay = hasActive && !this.uploadTasksError ? 2000 : 6000;
+ this._uploadRefreshTimer = setTimeout(async () => {
+ this._uploadRefreshTimer = null;
+ await this.loadUploadTasks();
+ }, delay);
},
stopUploadRefresh() {
- if (this._uploadRefreshTimer) {
- clearInterval(this._uploadRefreshTimer);
+ this._uploadRefreshEnabled = false;
+ if (this._uploadRefreshTimer !== null) {
+ clearTimeout(this._uploadRefreshTimer);
this._uploadRefreshTimer = null;
}
},
diff --git a/apps/omlx-web/omlx_web/templates/chat.html b/apps/omlx-web/omlx_web/templates/chat.html
index 326767c35a..276b4ba619 100644
--- a/apps/omlx-web/omlx_web/templates/chat.html
+++ b/apps/omlx-web/omlx_web/templates/chat.html
@@ -1374,7 +1374,7 @@