[GH-ISSUE #1155] [Windows / AMD] --vision cpu is still unreachable: hip_vision()'s WIN gate, find_vcvars()'s VS-18 range, and no encoder in the ready-made engine #486

Closed
opened 2026-11-04 01:43:26 +07:00 by bsakaguchi · 10 comments
Owner

Originally created by @Hugua700 on GitHub (Oct 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1155

[Windows / AMD] --vision cpu is still unreachable: the hip_vision() gate, find_vcvars()'s version range, and the ready-made engine installing no encoder

Follow-up to #881 (closed as completed). 0.1.40 fixed the two bugs reported there — the package_windows.py encoding
and the call "None" batch file — but the two blockers listed in #881's follow-up comment
were not answered, and they still stand on main (82f46a8, 0.1.40.1). --vision cpu on Windows + AMD cannot work
today, on a ready-made engine or a self-built one.

Everything below was read from main, not from memory of 0.1.39. The encoder itself is fine — it is a plain CPU
program with an MSVC branch, and it builds and runs on two Windows-AMD machines when the gate is opened by hand
(an RX 6800M / gfx1031 and a Strix Halo / gfx1151). What is missing is the plumbing.

1. hip_vision() refuses --vision cpu on Windows (setup.py:2212)

if asked == "cpu" and WIN:
    warn("images on the CPU with an AMD card are Linux-only for now (the ready-made Windows AMD engine has no "
         "image encoder): images off")
    return "none"

There is nothing Linux-only about tools/vision: it is a standalone CMake project (add_executable(strata-vision strata_vision.cpp), linking llama.cpp's mtmd + llama), not a HIP/CUDA target; its CMakeLists.txt has an explicit
if(STRATA_PORTABLE AND MSVC) branch and strata_vision.cpp contains #ifdef _WIN32. The reason for the message is
the packaging gap in §4, not a capability gap.

2. find_vcvars() cannot see Visual Studio 2026 (setup.py:1122)

p = out([str(vswhere), "-latest", "-products", "*", "-version", "[16.0,18.0)", "-requires",
         "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "-property", "installationPath"]).strip()

The range exists because CUDA 13 accepts VS 2019/2022 only, and that reasoning is right for the CUDA path. It is
applied to every caller, though, including the CUDA-less CPU encoder build. On a machine whose only C++ tools are
VS 2026 (version 18) this returns None. Measured on the RX 6800M machine:

> vswhere -latest -products * -version "[16.0,18.0)" -requires ...VC.Tools.x86.x64 -property installationPath
                                   (empty)
> vswhere -latest -products * -requires ...VC.Tools.x86.x64 -property installationPath
C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools          # vcvars64.bat is there

Note that tools/hip/build_windows.bat:55 already calls vswhere without the range and builds the whole HIP engine
with VS 2026 — so the packaging path works on VS 18 while setup cannot even find it.

The other half of this, reported from the Strix Halo machine: with a range that matches, vswhere's -latest can pick
an install that is present but broken (there, VS 2019 Build Tools without mspdbcore.dll → C1356), with no way to
point setup at the one that works. Until 0.1.40 that was a silent failure; now it is a clean fail(), which is an
improvement but still a dead end.

3. The ready-made Windows-AMD engine never installs an encoder (setup.py:4656)

if eng is not None and not hip and json.loads((eng / "BUILD.json").read_text(encoding="utf-8")).get("source") != "local":
    ...
    if vision != "none" and not (eng / VEXE).exists():
        warn("the ready-made engine has no image encoder: compiling it")
        eng = None
    else:
        vision = prebuilt_vision(...)

The not hip in that condition means the whole vision block is skipped for Windows + AMD: the ready-made engine is
kept, build_engine_hip() is never reached, and no encoder is built or installed. This is the prediction in #881 §4 —
"the Windows-HIP prebuilt path never builds or installs an encoder at all — even if hip_vision() were changed to
allow --vision cpu" — still true after 0.1.40, and it is why the 0.1.40 fix in build_vision_cpu() (passing
find_vcvars(), which #881 asked for) is unreachable code on this platform.

It also means opening the gate in §1 alone would be a regression rather than a fix, because vision would stay cpu
and setup.py:4911-4917 writes the model config's vision block pointing at engine/strata-vision.exe:

if vision != "none":
    cfg["vision"] = {"exe": str(eng / VEXE), ...}

— a path that nothing created. The server would then be configured for an encoder that is not there.

4. The ready-made zip carries no encoder (tools/hip/package_windows.py:36)

PROGRAMS = ("strata.exe", "strata-device.exe")

So even a user who is willing to let setup compile the encoder gets nothing from the prebuilt path, and a user without
the C++ build tools has no route to images at all.

What I did to confirm the encoder works (both machines, by hand)

  1. Build it with MSVC + Ninja (VS 2026 Build Tools on the RX 6800M machine, VS 2026 Community on the Strix Halo one):

    call "<VS>\VC\Auxiliary\Build\vcvars64.bat"
    cmake -G Ninja -S tools/vision -B build-vision -DCMAKE_BUILD_TYPE=Release \
          -DLLAMA_DIR=third_party/llama.cpp -DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=ON
    cmake --build build-vision --target strata-vision
    
  2. Copy strata-vision.exe into engine/, record "vision": "cpu" + vision_src in engine/BUILD.json.

  3. Remove the if asked == "cpu" and WIN: branch above, then run
    START-HERE.bat --setup --yes --family qwen --model <m> --vision cpu --no-start.

Result on both machines: setup reports images: on (encoder on the CPU), /health reports "images": true, and a
test image is described correctly through /v1/chat/completions (5.6 s on gfx1151 for a 400x200 image; ~20 s
including CPU encoding for a 720x360 one on gfx1031).

Note -DSTRATA_PORTABLE=ON in that recipe: it gives the encoder the static MSVC runtime, like the engine in the
ready-made zip. setup.py's build_vision_cpu() does not pass it.

Suggested fix

# Where Change
1 setup.py hip_vision() drop the and WIN gate; --vision cpu means the CPU encoder on every platform
2 setup.py find_vcvars() take the version range as a parameter (CUDA 13 asks for it, nothing else does), and honour a STRATA_VCVARS override for a broken or unusual install
3 setup.py build_vision_cpu() when Windows has no usable MSVC, warn and leave images off instead of stopping the whole setup — the engine is already installed and works
4 setup.py main() let the ready-made Windows-AMD engine install the CPU encoder beside itself (build the encoder only, never the HIP engine), or the encoder can never arrive for prebuilt users
5 tools/hip/package_windows.py + build_windows.bat build the CPU encoder in the packaging run and put strata-vision.exe in the zip, so images work with no toolchain at all

1-4 are enough for --vision cpu to work on Windows + AMD with the C++ build tools present; 5 additionally removes the
toolchain requirement. I have a branch with 1-4 written and a second commit for 5, and I am happy to open it as a PR if
that is wanted — and to test a build here (RX 6800M / gfx1031, Windows 11, Chinese locale, VS 2026 only) either way.

Machines: Windows 11, R9 5900HX + RX 6800M (gfx1031), 31 GB RAM, self-built 0.1.40 HIP engine — and nencinif's Strix
Halo (Ryzen AI Max+ 395 + Radeon 8060S / gfx1151) for §1 and §2.

Originally created by @Hugua700 on GitHub (Oct 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/1155 # [Windows / AMD] `--vision cpu` is still unreachable: the `hip_vision()` gate, `find_vcvars()`'s version range, and the ready-made engine installing no encoder Follow-up to #881 (closed as completed). 0.1.40 fixed the two bugs reported there — the `package_windows.py` encoding and the `call "None"` batch file — but the two blockers listed in [#881's follow-up comment](https://github.com/Niko1221/Strata/issues/881#issuecomment-6011543135) were not answered, and they still stand on `main` (82f46a8, 0.1.40.1). `--vision cpu` on Windows + AMD cannot work today, on a ready-made engine or a self-built one. Everything below was read from `main`, not from memory of 0.1.39. The encoder itself is fine — it is a plain CPU program with an MSVC branch, and it builds and runs on two Windows-AMD machines when the gate is opened by hand (an RX 6800M / gfx1031 and a Strix Halo / gfx1151). What is missing is the plumbing. ## 1. `hip_vision()` refuses `--vision cpu` on Windows (setup.py:2212) ```python if asked == "cpu" and WIN: warn("images on the CPU with an AMD card are Linux-only for now (the ready-made Windows AMD engine has no " "image encoder): images off") return "none" ``` There is nothing Linux-only about `tools/vision`: it is a standalone CMake project (`add_executable(strata-vision strata_vision.cpp)`, linking llama.cpp's `mtmd` + `llama`), not a HIP/CUDA target; its `CMakeLists.txt` has an explicit `if(STRATA_PORTABLE AND MSVC)` branch and `strata_vision.cpp` contains `#ifdef _WIN32`. The reason for the message is the packaging gap in §4, not a capability gap. ## 2. `find_vcvars()` cannot see Visual Studio 2026 (setup.py:1122) ```python p = out([str(vswhere), "-latest", "-products", "*", "-version", "[16.0,18.0)", "-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", "-property", "installationPath"]).strip() ``` The range exists because CUDA 13 accepts VS 2019/2022 only, and that reasoning is right for the CUDA path. It is applied to every caller, though, including the CUDA-less CPU encoder build. On a machine whose only C++ tools are VS 2026 (version 18) this returns `None`. Measured on the RX 6800M machine: ``` > vswhere -latest -products * -version "[16.0,18.0)" -requires ...VC.Tools.x86.x64 -property installationPath (empty) > vswhere -latest -products * -requires ...VC.Tools.x86.x64 -property installationPath C:\Program Files (x86)\Microsoft Visual Studio\18\BuildTools # vcvars64.bat is there ``` Note that `tools/hip/build_windows.bat:55` already calls vswhere **without** the range and builds the whole HIP engine with VS 2026 — so the packaging path works on VS 18 while setup cannot even find it. The other half of this, reported from the Strix Halo machine: with a range that matches, vswhere's `-latest` can pick an install that is present but broken (there, VS 2019 Build Tools without `mspdbcore.dll` → `C1356`), with no way to point setup at the one that works. Until 0.1.40 that was a silent failure; now it is a clean `fail()`, which is an improvement but still a dead end. ## 3. The ready-made Windows-AMD engine never installs an encoder (setup.py:4656) ```python if eng is not None and not hip and json.loads((eng / "BUILD.json").read_text(encoding="utf-8")).get("source") != "local": ... if vision != "none" and not (eng / VEXE).exists(): warn("the ready-made engine has no image encoder: compiling it") eng = None else: vision = prebuilt_vision(...) ``` The `not hip` in that condition means the whole vision block is skipped for Windows + AMD: the ready-made engine is kept, `build_engine_hip()` is never reached, and no encoder is built or installed. This is the prediction in #881 §4 — "the Windows-HIP prebuilt path never builds or installs an encoder at all — even if `hip_vision()` were changed to allow `--vision cpu`" — still true after 0.1.40, and it is why the 0.1.40 fix in `build_vision_cpu()` (passing `find_vcvars()`, which #881 asked for) is unreachable code on this platform. It also means opening the gate in §1 alone would be a regression rather than a fix, because `vision` would stay `cpu` and setup.py:4911-4917 writes the model config's `vision` block pointing at `engine/strata-vision.exe`: ```python if vision != "none": cfg["vision"] = {"exe": str(eng / VEXE), ...} ``` — a path that nothing created. The server would then be configured for an encoder that is not there. ## 4. The ready-made zip carries no encoder (tools/hip/package_windows.py:36) ```python PROGRAMS = ("strata.exe", "strata-device.exe") ``` So even a user who is willing to let setup compile the encoder gets nothing from the prebuilt path, and a user without the C++ build tools has no route to images at all. ## What I did to confirm the encoder works (both machines, by hand) 1. Build it with MSVC + Ninja (VS 2026 Build Tools on the RX 6800M machine, VS 2026 Community on the Strix Halo one): ``` call "<VS>\VC\Auxiliary\Build\vcvars64.bat" cmake -G Ninja -S tools/vision -B build-vision -DCMAKE_BUILD_TYPE=Release \ -DLLAMA_DIR=third_party/llama.cpp -DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=ON cmake --build build-vision --target strata-vision ``` 2. Copy `strata-vision.exe` into `engine/`, record `"vision": "cpu"` + `vision_src` in `engine/BUILD.json`. 3. Remove the `if asked == "cpu" and WIN:` branch above, then run `START-HERE.bat --setup --yes --family qwen --model <m> --vision cpu --no-start`. Result on both machines: setup reports `images: on (encoder on the CPU)`, `/health` reports `"images": true`, and a test image is described correctly through `/v1/chat/completions` (5.6 s on gfx1151 for a 400x200 image; ~20 s including CPU encoding for a 720x360 one on gfx1031). Note `-DSTRATA_PORTABLE=ON` in that recipe: it gives the encoder the static MSVC runtime, like the engine in the ready-made zip. `setup.py`'s `build_vision_cpu()` does not pass it. ## Suggested fix | # | Where | Change | |---|---|---| | 1 | `setup.py` `hip_vision()` | drop the `and WIN` gate; `--vision cpu` means the CPU encoder on every platform | | 2 | `setup.py` `find_vcvars()` | take the version range as a parameter (CUDA 13 asks for it, nothing else does), and honour a `STRATA_VCVARS` override for a broken or unusual install | | 3 | `setup.py` `build_vision_cpu()` | when Windows has no usable MSVC, warn and leave images off instead of stopping the whole setup — the engine is already installed and works | | 4 | `setup.py` `main()` | let the ready-made Windows-AMD engine install the CPU encoder beside itself (build the encoder only, never the HIP engine), or the encoder can never arrive for prebuilt users | | 5 | `tools/hip/package_windows.py` + `build_windows.bat` | build the CPU encoder in the packaging run and put `strata-vision.exe` in the zip, so images work with no toolchain at all | 1-4 are enough for `--vision cpu` to work on Windows + AMD with the C++ build tools present; 5 additionally removes the toolchain requirement. I have a branch with 1-4 written and a second commit for 5, and I am happy to open it as a PR if that is wanted — and to test a build here (RX 6800M / gfx1031, Windows 11, Chinese locale, VS 2026 only) either way. Machines: Windows 11, R9 5900HX + RX 6800M (gfx1031), 31 GB RAM, self-built 0.1.40 HIP engine — and nencinif's Strix Halo (Ryzen AI Max+ 395 + Radeon 8060S / gfx1151) for §1 and §2.
Author
Owner

@gt50 commented on GitHub (Oct 10, 2026):

Confirming on another Strix Halo under Windows: the CPU encoder works once it's built and wired in by hand.

Machine: GMKtec EVO-X2, Ryzen AI Max+ 395 / Radeon 8060S (gfx1151), Windows 11 Pro 10.0.26300, the ready-made strata-windows-x64-hip.zip 0.1.40.2, Unsloth UD-IQ4_XS.

What I did, without running setup (so setup.py stays unmodified):

  1. Built the encoder with VS 2022 Build Tools (17.14) and the Ninja from Strata's .venv, the way build_vision_cpu() does (native CPU, so AVX-512 here):

    cmake -G Ninja -S tools/vision -B build-vision -DCMAKE_BUILD_TYPE=Release -DLLAMA_DIR=third_party/llama.cpp -DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=OFF
    cmake --build build-vision --target strata-vision
    

    131 steps, no errors. I copied build-vision\bin\strata-vision.exe to engine\. It runs outside the VS environment, with no missing DLLs.

  2. Downloaded the vision file setup uses for the Unsloth family: mmproj-Qwen3.8-Flash-Next-BF16.gguf from ISTA-DASLab at the pinned revision ed59f920…. The SHA-256 matches the published b1a82259….

  3. Added to the model config what setup writes for --vision cpu:

    • the "vision" block: exe, mmproj, model = shard 00001, gpu: false, max_tokens: 300, threads: 16;
    • and --vision --vram-reserve-mib 700 in args.

    With the vision block alone, /health already says "images": true, but every image request fails with 400 this engine was started without --vision. So anyone wiring this up by hand needs both parts.

Result:

  • Health and memory: /health reports "images": true, and all 24,576 experts still fit in the cache (33 GB of VRAM free).
  • Accuracy: a 640x360 test picture (red circle, blue square, green triangle, the text "STRATA 2026") was described correctly: every shape, color and position, and the text read exactly.
  • Speed: 7.8 s total. The 252-token prompt (image included) took 1.6 s, and the answer came at 46.5 tok/s. The encoder loads its files in 1.2 s on 16 threads.

Note: the encoder logs Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks against setup's CPU default of 300 (max_tokens). Simple pictures were fine; dense documents and grounding may want more.

So this machine agrees with the #1155 analysis: nothing in the encoder is Linux-only. What's missing is setup's Windows-AMD path (hip_vision(), the ready-made zip) installing and enabling it.

<!-- gh-comment-id:6091683233 --> @gt50 commented on GitHub (Oct 10, 2026): Confirming on another Strix Halo under Windows: the CPU encoder works once it's built and wired in by hand. **Machine:** GMKtec EVO-X2, Ryzen AI Max+ 395 / Radeon 8060S (gfx1151), Windows 11 Pro 10.0.26300, the ready-made `strata-windows-x64-hip.zip` 0.1.40.2, Unsloth UD-IQ4_XS. **What I did, without running setup (so `setup.py` stays unmodified):** 1. **Built the encoder** with VS 2022 Build Tools (17.14) and the Ninja from Strata's `.venv`, the way `build_vision_cpu()` does (native CPU, so AVX-512 here): ``` cmake -G Ninja -S tools/vision -B build-vision -DCMAKE_BUILD_TYPE=Release -DLLAMA_DIR=third_party/llama.cpp -DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=OFF cmake --build build-vision --target strata-vision ``` 131 steps, no errors. I copied `build-vision\bin\strata-vision.exe` to `engine\`. It runs outside the VS environment, with no missing DLLs. 2. **Downloaded the vision file setup uses for the Unsloth family:** `mmproj-Qwen3.8-Flash-Next-BF16.gguf` from ISTA-DASLab at the pinned revision `ed59f920…`. The SHA-256 matches the published `b1a82259…`. 3. **Added to the model config what setup writes for `--vision cpu`:** - the `"vision"` block: `exe`, `mmproj`, `model` = shard 00001, `gpu: false`, `max_tokens: 300`, `threads: 16`; - **and** `--vision --vram-reserve-mib 700` in `args`. With the vision block alone, `/health` already says `"images": true`, but every image request fails with `400 this engine was started without --vision`. So anyone wiring this up by hand needs both parts. **Result:** - **Health and memory:** `/health` reports `"images": true`, and all 24,576 experts still fit in the cache (33 GB of VRAM free). - **Accuracy:** a 640x360 test picture (red circle, blue square, green triangle, the text "STRATA 2026") was described correctly: every shape, color and position, and the text read exactly. - **Speed:** 7.8 s total. The 252-token prompt (image included) took 1.6 s, and the answer came at 46.5 tok/s. The encoder loads its files in 1.2 s on 16 threads. **Note:** the encoder logs `Qwen-VL models require at minimum 1024 image tokens to function correctly on grounding tasks` against setup's CPU default of 300 (`max_tokens`). Simple pictures were fine; dense documents and grounding may want more. So this machine agrees with the #1155 analysis: nothing in the encoder is Linux-only. What's missing is setup's Windows-AMD path (`hip_vision()`, the ready-made zip) installing and enabling it.
Author
Owner

@gt50 commented on GitHub (Oct 10, 2026):

Follow-up to my comment above: the encoder also runs on the GPU on Windows AMD, built with llama.cpp's Vulkan backend, and it's much faster for documents.

Build. Same machine (Ryzen AI Max+ 395 / Radeon 8060S, Windows 11), with the Vulkan SDK installed (1.4.350, for glslc). Its own folder, so the CPU build stays:

cmake -G Ninja -S tools/vision -B build-vision-vulkan -DCMAKE_BUILD_TYPE=Release -DLLAMA_DIR=third_party/llama.cpp -DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=OFF -DGGML_VULKAN=ON
cmake --build build-vision-vulkan --target strata-vision
  • The CMake file needs no change: it forces only GGML_CUDA, so GGML_VULKAN passes straight through (449 build steps, "Including Vulkan backend").
  • Turning it on: copy the encoder to engine\ and set "gpu": true in the config's vision block, so the server passes --gpu. It loads in 1.1 s and warms up at 1024 image tokens in 1.8 s.

Measured. UD-IQ4_XS, 1224 x 1584 phone photos of documents (tilted, softened), 1024 image tokens, the first read of each picture:

Photo CPU encoder (16 threads, AVX-512) Vulkan encoder
5-column settlement statement 31.7 s, 44/44 amounts in the right column 9.8 s, 44/44
permit list 27.7 s, permit number exact 6.2 s, exact
  • Encoding itself: ~23 s on the CPU, ~1 s on the GPU. The rest of each time is the same in both: reading the prompt and writing the answer.
  • Why 1024 tokens: at the CPU default of 300, the same statement photo read only 32/44 amounts in the right column and misread the year (2026 as 2008), and the permit number lost a digit.
  • Text requests: unaffected (--vram-reserve-mib 700, all 24,576 experts still cached).

Setup support for both builds is in #1789:

  • --vision cpu uses a hand-built encoder (from build-vision);
  • --vision gpu uses the Vulkan build (from build-vision-vulkan);
  • after an engine update, setup copies the encoder next to the engine again;
  • the build steps are documented in docs/AMD_HIP.md.

Also noting #1322 on main (the engine started with --vision when the config has a vision section), which fixes the this engine was started without --vision gotcha from my previous comment.

<!-- gh-comment-id:6093210009 --> @gt50 commented on GitHub (Oct 10, 2026): Follow-up to my comment above: the encoder also runs **on the GPU on Windows AMD**, built with llama.cpp's Vulkan backend, and it's much faster for documents. **Build.** Same machine (Ryzen AI Max+ 395 / Radeon 8060S, Windows 11), with the Vulkan SDK installed (1.4.350, for `glslc`). Its own folder, so the CPU build stays: ``` cmake -G Ninja -S tools/vision -B build-vision-vulkan -DCMAKE_BUILD_TYPE=Release -DLLAMA_DIR=third_party/llama.cpp -DSTRATA_VISION_CUDA=OFF -DSTRATA_PORTABLE=OFF -DGGML_VULKAN=ON cmake --build build-vision-vulkan --target strata-vision ``` - **The CMake file needs no change:** it forces only `GGML_CUDA`, so `GGML_VULKAN` passes straight through (449 build steps, "Including Vulkan backend"). - **Turning it on:** copy the encoder to `engine\` and set `"gpu": true` in the config's `vision` block, so the server passes `--gpu`. It loads in 1.1 s and warms up at 1024 image tokens in 1.8 s. **Measured.** UD-IQ4_XS, 1224 x 1584 phone photos of documents (tilted, softened), 1024 image tokens, the first read of each picture: | Photo | CPU encoder (16 threads, AVX-512) | Vulkan encoder | | --- | --- | --- | | 5-column settlement statement | 31.7 s, 44/44 amounts in the right column | **9.8 s**, 44/44 | | permit list | 27.7 s, permit number exact | **6.2 s**, exact | - **Encoding itself:** ~23 s on the CPU, ~1 s on the GPU. The rest of each time is the same in both: reading the prompt and writing the answer. - **Why 1024 tokens:** at the CPU default of 300, the same statement photo read only 32/44 amounts in the right column and misread the year (2026 as 2008), and the permit number lost a digit. - **Text requests:** unaffected (`--vram-reserve-mib 700`, all 24,576 experts still cached). **Setup support** for both builds is in #1789: - `--vision cpu` uses a hand-built encoder (from `build-vision`); - `--vision gpu` uses the Vulkan build (from `build-vision-vulkan`); - after an engine update, setup copies the encoder next to the engine again; - the build steps are documented in `docs/AMD_HIP.md`. Also noting #1322 on `main` (the engine started with `--vision` when the config has a vision section), which fixes the `this engine was started without --vision` gotcha from my previous comment.
Author
Owner

@Hugua700 commented on GitHub (Oct 10, 2026):

@gt50 — thank you. The Vulkan build is the better answer for this, and your numbers settle it: encoding ~23 s on the CPU against ~1 s on the GPU (31.7 s → 9.8 s on the settlement statement). Two things in your follow-up I had not considered at all: that tools/vision's CMake file forces only GGML_CUDA, so GGML_VULKAN passes straight through; and that setup's CPU default of 300 tokens is too low for documents (32/44 amounts, 2026 read as 2008) — that is a quality bug on its own.

#1789 supersedes my #1156 on this path, so I have closed #1156 rather than leave two overlapping PRs to review. #1789 covers hip_vision(), placing the encoder after an engine update, the docs and the tests — more than mine did, plus the GPU path mine never had.

Two things #1789 does not cover. I have kept them separate instead of folding them in:

1. find_vcvars() cannot see Visual Studio 2026 — and that blocks #1789's own --vision cpu.

#985's cuda_v relaxes the [16.0,18.0) range only for CUDA 13.3+. A non-CUDA caller still passes no cuda_v, so the range still applies, and a machine whose only C++ tools are Visual Studio 2026 (version 18) gets None back. build_vision_cpu() calls find_vcvars() with no arguments, so on that machine the encoder cannot be built at all and --vision cpu stays unreachable even with your gate open.

That is the machine this issue came from (RX 6800M / gfx1031, Windows 11, Chinese locale, VS 2026 Build Tools 18.4.11605 the only C++ tools). Filed as its own small PR — #1792, one function, CUDA callers unchanged (cuda_v=(13, 0) still refuses VS 18, cuda_v=(13, 3) still takes it) — because it is independent of the vision plumbing. It also adds STRATA_VCVARS=<vcvars64.bat> for a vswhere that cannot be used.

2. Shipping the encoder inside the ready-made zip.

The original point of this issue was that the ready-made Windows AMD engine carries no encoder, and #1789 (like my #1156) still leaves the user to install VS Build Tools or the Vulkan SDK and build by hand. package_windows.py could carry a strata-vision.exe built with -DSTRATA_PORTABLE=ON (AVX2 baseline + static CRT, so it runs on other people's machines), and setup would then need no toolchain at all. I measured it before closing #1156: the zip goes 120 → 122 MiB, its BUILD.json records "vision": "cpu", and a build without an encoder packages exactly as before. That is a release-policy call rather than a bug, so I have not filed it — say the word and I will.

And thank you for #1322 as well: the "images": true plus 400 this engine was started without --vision mismatch I hit when wiring it up by hand is exactly that.

<!-- gh-comment-id:6093638085 --> @Hugua700 commented on GitHub (Oct 10, 2026): @gt50 — thank you. The Vulkan build is the better answer for this, and your numbers settle it: encoding ~23 s on the CPU against ~1 s on the GPU (31.7 s → 9.8 s on the settlement statement). Two things in your follow-up I had not considered at all: that `tools/vision`'s CMake file forces only `GGML_CUDA`, so `GGML_VULKAN` passes straight through; and that setup's CPU default of 300 tokens is too low for documents (32/44 amounts, 2026 read as 2008) — that is a quality bug on its own. **#1789 supersedes my #1156 on this path**, so I have closed #1156 rather than leave two overlapping PRs to review. #1789 covers `hip_vision()`, placing the encoder after an engine update, the docs and the tests — more than mine did, plus the GPU path mine never had. Two things #1789 does not cover. I have kept them separate instead of folding them in: **1. `find_vcvars()` cannot see Visual Studio 2026 — and that blocks #1789's own `--vision cpu`.** #985's `cuda_v` relaxes the `[16.0,18.0)` range only for CUDA 13.3+. A **non-CUDA** caller still passes no `cuda_v`, so the range still applies, and a machine whose only C++ tools are Visual Studio 2026 (version 18) gets `None` back. `build_vision_cpu()` calls `find_vcvars()` with no arguments, so on that machine the encoder cannot be built at all and `--vision cpu` stays unreachable even with your gate open. That is the machine this issue came from (RX 6800M / gfx1031, Windows 11, Chinese locale, VS 2026 Build Tools 18.4.11605 the only C++ tools). Filed as its own small PR — **#1792**, one function, CUDA callers unchanged (`cuda_v=(13, 0)` still refuses VS 18, `cuda_v=(13, 3)` still takes it) — because it is independent of the vision plumbing. It also adds `STRATA_VCVARS=<vcvars64.bat>` for a vswhere that cannot be used. **2. Shipping the encoder inside the ready-made zip.** The original point of this issue was that the ready-made Windows AMD engine carries no encoder, and #1789 (like my #1156) still leaves the user to install VS Build Tools *or* the Vulkan SDK and build by hand. `package_windows.py` could carry a `strata-vision.exe` built with `-DSTRATA_PORTABLE=ON` (AVX2 baseline + static CRT, so it runs on other people's machines), and setup would then need no toolchain at all. I measured it before closing #1156: the zip goes 120 → 122 MiB, its `BUILD.json` records `"vision": "cpu"`, and a build without an encoder packages exactly as before. That is a release-policy call rather than a bug, so I have not filed it — say the word and I will. And thank you for #1322 as well: the `"images": true` plus `400 this engine was started without --vision` mismatch I hit when wiring it up by hand is exactly that.
Author
Owner

@Niko1221 commented on GitHub (Oct 13, 2026):

Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.

If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.

<!-- gh-comment-id:6156026105 --> @Niko1221 commented on GitHub (Oct 13, 2026): Thanks for the report. To keep the tracker current we are closing issues older than three days: [0.1.44](https://github.com/Niko1221/Strata/releases/tag/v0.1.44) is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1. If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
Author
Owner

@Hugua700 commented on GitHub (Oct 14, 2026):

Re-checked on v0.1.44: the published Windows HIP engine still ships without gfx1031, and still ships without any vision binary. Two things I could verify, in case they are useful.

1. What the published engine actually contains

strata-windows-x64-hip.zip (604.2 MB, sha256 71b8a531c3c54e59de3029a371787840d515591d63e04ccd5e94633af28470ae), BUILD.json read straight out of the archive:

{"source":"prebuilt","backend":"hip","platform":"windows-x64","version":"0.1.44",
 "archs":["gfx1100","gfx1101","gfx1102","gfx1200","gfx1201","gfx1030","gfx1151"],
 "rocm":"10.2.0a20260930","hipblaslt_version":100500,"vision":"none","lib_dirs":["rocm/bin"]}
  • gfx1031 is not in archs. rocm/.kpack holds gfx1030 gfx1100 gfx1101 gfx1102 gfx1151 gfx1200 gfx1201 — no gfx1031.
  • The archive contains no vision/encoder entries at all: no strata-vision.exe, nothing matching vision|encoder|mmproj|clip.

2. It is not a dead end on gfx1031 — both halves work here

Machine: ROG Strix G513QY, Ryzen 9 5900HX + Radeon RX 6800M (gfx1031), Windows 11 26300, official ROCm 10.2.0a20260930. Only 12 GB VRAM.

  • Engine: built from source with tools/hip/build_windows.bat and STRATA_HIP_ARCHS=gfx1031. It cross-compiles on a second machine that has no AMD GPU at all, so this is not something that needs your hardware. Resulting BUILD.json: "archs":["gfx1031"], and it runs.
  • Vision: built the Vulkan vision target ourselves. strata-vision.exe is 41,202,176 bytes, and vision works: /health reports "images": true, and a synthetic 768x512 test image (red circle, blue square, green triangle, and bold black STRATA 2026 TEMP-TEST) is described correctly, including reading the text. A/B note: with our own binary the BUILD.json "vision" field makes no difference at all (none and cpu produced byte-identical answers), so the published "none" describes what ships, not what the code can do.

Earlier notes on this machine, including the two-GPU Vulkan encoder behaviour from #1792: https://github.com/Hugua700/old-amd-local-ai

3. The asks

  1. Could gfx1031 be added to the published Windows HIP engine? It is the laptop member of the same Navi 22 family as gfx1030, which you do ship, and it is common (RX 6800M / 6700M / 6600M in ROG, Alienware, Legion laptops).
  2. If the Vulkan vision build is a supported path, a line in the Windows/AMD docs pointing at that target would let people reach vision without a HIP vision build.

I still have the machine and the logs, so I am happy to re-test on 0.1.44 / 0.1.44.1 the moment a gfx1031 build exists — including on the exact model that motivated the original report. Thanks for 0.1.43.1's long-prompt fix either way; that one matches something we hit on 12 GB cards.

<!-- gh-comment-id:6158367493 --> @Hugua700 commented on GitHub (Oct 14, 2026): Re-checked on **v0.1.44**: the published Windows HIP engine still ships without `gfx1031`, and still ships without any vision binary. Two things I could verify, in case they are useful. ## 1. What the published engine actually contains `strata-windows-x64-hip.zip` (604.2 MB, sha256 `71b8a531c3c54e59de3029a371787840d515591d63e04ccd5e94633af28470ae`), `BUILD.json` read straight out of the archive: ```json {"source":"prebuilt","backend":"hip","platform":"windows-x64","version":"0.1.44", "archs":["gfx1100","gfx1101","gfx1102","gfx1200","gfx1201","gfx1030","gfx1151"], "rocm":"10.2.0a20260930","hipblaslt_version":100500,"vision":"none","lib_dirs":["rocm/bin"]} ``` * `gfx1031` is not in `archs`. `rocm/.kpack` holds `gfx1030 gfx1100 gfx1101 gfx1102 gfx1151 gfx1200 gfx1201` — no `gfx1031`. * The archive contains **no** vision/encoder entries at all: no `strata-vision.exe`, nothing matching `vision|encoder|mmproj|clip`. ## 2. It is not a dead end on gfx1031 — both halves work here Machine: ROG Strix G513QY, Ryzen 9 5900HX + **Radeon RX 6800M (gfx1031)**, Windows 11 26300, official ROCm 10.2.0a20260930. Only 12 GB VRAM. * **Engine:** built from source with `tools/hip/build_windows.bat` and `STRATA_HIP_ARCHS=gfx1031`. It cross-compiles on a second machine that has **no AMD GPU at all**, so this is not something that needs your hardware. Resulting `BUILD.json`: `"archs":["gfx1031"]`, and it runs. * **Vision:** built the Vulkan vision target ourselves. `strata-vision.exe` is 41,202,176 bytes, and vision works: `/health` reports `"images": true`, and a synthetic 768x512 test image (red circle, blue square, green triangle, and bold black `STRATA 2026 TEMP-TEST`) is described correctly, **including reading the text**. A/B note: with our own binary the `BUILD.json` `"vision"` field makes no difference at all (`none` and `cpu` produced byte-identical answers), so the published `"none"` describes what ships, not what the code can do. Earlier notes on this machine, including the two-GPU Vulkan encoder behaviour from #1792: https://github.com/Hugua700/old-amd-local-ai ## 3. The asks 1. Could `gfx1031` be added to the published Windows HIP engine? It is the laptop member of the same Navi 22 family as `gfx1030`, which you do ship, and it is common (RX 6800M / 6700M / 6600M in ROG, Alienware, Legion laptops). 2. If the Vulkan vision build is a supported path, a line in the Windows/AMD docs pointing at that target would let people reach vision without a HIP vision build. I still have the machine and the logs, so I am happy to re-test on 0.1.44 / 0.1.44.1 the moment a gfx1031 build exists — including on the exact model that motivated the original report. Thanks for 0.1.43.1's long-prompt fix either way; that one matches something we hit on 12 GB cards.
Author
Owner

@Hugua700 commented on GitHub (Oct 14, 2026):

Follow-up: I built v0.1.44 (ed4773eb) from source for gfx1031, and it works. Posting it here since the earlier note in this thread said I would re-test once a gfx1031 build existed.

  • Built with tools/hip/build_windows.bat and STRATA_HIP_ARCHS=gfx1031, on a second machine that has no AMD GPU at all (pure cross-compile, so no gfx1031 hardware is needed to produce it).
  • BUILD.json read straight out of the resulting archive:
{"source":"prebuilt","backend":"hip","platform":"windows-x64","version":"0.1.44",
 "archs":["gfx1031"],"rocm":"10.2.0a20260930","hipblaslt_version":100500,
 "vision":"none","lib_dirs":["rocm/bin"]}

zip sha256 25e6371e03c8eec0ab75c8fa721de4d9d9fbd1c7a73fc520dcb0c37b904b0de4 (126,934,139 bytes).

  • It runs on the RX 6800M: /health reports "images": true, and the synthetic 768x512 test image (red circle left, blue square middle, green triangle right, bold black caption STRATA 2026 TEMP-TEST) is described correctly including reading the caption text.

One thing that may be useful: v0.1.44's own tools/hip/build_windows.bat already lists gfx1031 in its default STRATA_HIP_ARCHS (the comment there even cites #915 / #1078). So the source path handles gfx1031 fine -- it is only the published Windows engine that omits it.

Nothing further needed from me on this issue; I am just closing the loop on the "re-test on 0.1.44" note above. Thanks for 0.1.44.

<!-- gh-comment-id:6169165068 --> @Hugua700 commented on GitHub (Oct 14, 2026): Follow-up: I built **v0.1.44** (`ed4773eb`) from source for `gfx1031`, and it works. Posting it here since the earlier note in this thread said I would re-test once a gfx1031 build existed. * Built with `tools/hip/build_windows.bat` and `STRATA_HIP_ARCHS=gfx1031`, on a second machine that has **no AMD GPU at all** (pure cross-compile, so no gfx1031 hardware is needed to produce it). * `BUILD.json` read straight out of the resulting archive: ```json {"source":"prebuilt","backend":"hip","platform":"windows-x64","version":"0.1.44", "archs":["gfx1031"],"rocm":"10.2.0a20260930","hipblaslt_version":100500, "vision":"none","lib_dirs":["rocm/bin"]} ``` zip sha256 `25e6371e03c8eec0ab75c8fa721de4d9d9fbd1c7a73fc520dcb0c37b904b0de4` (126,934,139 bytes). * It runs on the RX 6800M: `/health` reports `"images": true`, and the synthetic 768x512 test image (red circle left, blue square middle, green triangle right, bold black caption `STRATA 2026 TEMP-TEST`) is described correctly **including reading the caption text**. One thing that may be useful: v0.1.44's own `tools/hip/build_windows.bat` **already lists `gfx1031` in its default `STRATA_HIP_ARCHS`** (the comment there even cites #915 / #1078). So the source path handles gfx1031 fine -- it is only the *published* Windows engine that omits it. Nothing further needed from me on this issue; I am just closing the loop on the "re-test on 0.1.44" note above. Thanks for 0.1.44.
Author
Owner

@ogwtak commented on GitHub (Oct 15, 2026):

I'm a Windows user in Japan, not a software engineer.
I'm running Strata on two Windows systems:
AMD Strix Halo (128GB)
64GB RAM + NVIDIA RTX 3070 (8GB VRAM)

On the latter system, I encountered an out-of-VRAM error when launching Strata after setup. I asked Codex to fix the issue, and it ended up replacing the image encoder with one that runs on the CPU.

Seeing this, I asked Codex to "make it work the same way on Strix Halo." After letting Codex modify the setup, I was able to use image recognition successfully on my Strix Halo system as well.

Adding a special workaround may not be the most elegant solution. However, it seems (probably!) that this could be handled with relatively minor changes to the setup script, without modifying the core engine.
Since CPU-based image encoding is already used in NVIDIA environments when VRAM is limited, I think offering the same option for Windows + AMD users would be a useful interim solution, especially for non-technical users like myself.

It would be great to have an option such as "Use Image Encoder on CPU (Slower, but saves VRAM)" during setup on Windows system.
Thanks to everyone involved in developing Strata!

<!-- gh-comment-id:6184806142 --> @ogwtak commented on GitHub (Oct 15, 2026): I'm a Windows user in Japan, not a software engineer. I'm running Strata on two Windows systems: AMD Strix Halo (128GB) 64GB RAM + NVIDIA RTX 3070 (8GB VRAM) On the latter system, I encountered an out-of-VRAM error when launching Strata after setup. I asked Codex to fix the issue, and it ended up replacing the image encoder with one that runs on the CPU. Seeing this, I asked Codex to "make it work the same way on Strix Halo." After letting Codex modify the setup, I was able to use image recognition successfully on my Strix Halo system as well. Adding a special workaround may not be the most elegant solution. However, it seems (probably!) that this could be handled with relatively minor changes to the setup script, without modifying the core engine. Since CPU-based image encoding is already used in NVIDIA environments when VRAM is limited, I think offering the same option for Windows + AMD users would be a useful interim solution, especially for non-technical users like myself. It would be great to have an option such as "Use Image Encoder on CPU (Slower, but saves VRAM)" during setup on Windows system. Thanks to everyone involved in developing Strata!
Author
Owner

@Hugua700 commented on GitHub (Oct 15, 2026):

Note that this issue is closed, so it may be missed here -- the live place for Windows image support is PR #1789 ("setup: images on Windows AMD with a hand-built encoder, CPU or Vulkan", by @gt50), which is still open and resolves this issue.

What you are asking for is essentially what that PR adds:

  • hip_vision() accepts --vision cpu on Windows when a hand-built encoder exists (it looks in engine\, build-vision\bin, engine\.previous, build-vision-vulkan\bin), and --vision gpu when the Vulkan build exists -- i.e. your "Use Image Encoder on CPU (slower, but saves VRAM)" option, as an opt-in flag rather than a setup prompt.
  • place_windows_encoder() puts the chosen build beside the engine, including after an engine update replaces engine\ -- that is the step that catches people who place the encoder by hand.
  • With no encoder anywhere, images stay off exactly as before, so nothing changes for users who do not want this.

Two things worth knowing before you rebuild:

  • The encoder is not in the published zip; it has to be built from tools/vision (-DGGML_VULKAN=ON for the GPU build). That is why the PR is setup-only, and why this is not yet a one-click setup choice.
  • On a machine whose only C++ toolchain is a recent Visual Studio, the CPU encoder build used to fail inside find_vcvars(); that was fixed by #1792 (Hugua700, closed with the content folded in). If your copy predates that, update first.

For your Strix Halo specifically: the Vulkan measurements in that PR (9.8 s vs 31.7 s per document photo) were taken on a Ryzen AI Max+ 395 / Radeon 8060S -- the same hardware you have -- so on that box the GPU encoder is both the tested route and by far the faster one. The CPU encoder is the fallback that matters on your 8 GB RTX 3070.

For the 8 GB side, there is also a recent community thread on an RTX 3070 Ti 8 GB (#2581) if you want numbers from that VRAM class.

I wrote the whole Windows + AMD route up in one place, including the traps (SPIRV-Headers_DIR on older Windows Vulkan SDKs) and how a hand-placed encoder behaves on a 12 GB gfx1031 card: https://github.com/Hugua700/old-amd-local-ai

<!-- gh-comment-id:6185635683 --> @Hugua700 commented on GitHub (Oct 15, 2026): Note that this issue is closed, so it may be missed here -- the live place for Windows image support is **PR #1789** ("setup: images on Windows AMD with a hand-built encoder, CPU or Vulkan", by @gt50), which is still open and resolves this issue. What you are asking for is essentially what that PR adds: * `hip_vision()` accepts **`--vision cpu`** on Windows when a hand-built encoder exists (it looks in `engine\`, `build-vision\bin`, `engine\.previous`, `build-vision-vulkan\bin`), and **`--vision gpu`** when the Vulkan build exists -- i.e. your "Use Image Encoder on CPU (slower, but saves VRAM)" option, as an opt-in flag rather than a setup prompt. * `place_windows_encoder()` puts the chosen build beside the engine, **including after an engine update replaces `engine\`** -- that is the step that catches people who place the encoder by hand. * With no encoder anywhere, images stay off exactly as before, so nothing changes for users who do not want this. Two things worth knowing before you rebuild: * The encoder is **not in the published zip**; it has to be built from `tools/vision` (`-DGGML_VULKAN=ON` for the GPU build). That is why the PR is setup-only, and why this is not yet a one-click setup choice. * On a machine whose only C++ toolchain is a recent Visual Studio, the CPU encoder build used to fail inside `find_vcvars()`; that was fixed by #1792 (Hugua700, closed with the content folded in). If your copy predates that, update first. For your Strix Halo specifically: the Vulkan measurements in that PR (9.8 s vs 31.7 s per document photo) were taken on a **Ryzen AI Max+ 395 / Radeon 8060S** -- the same hardware you have -- so on that box the GPU encoder is both the tested route and by far the faster one. The CPU encoder is the fallback that matters on your 8 GB RTX 3070. For the 8 GB side, there is also a recent community thread on an RTX 3070 Ti 8 GB (#2581) if you want numbers from that VRAM class. I wrote the whole Windows + AMD route up in one place, including the traps (SPIRV-Headers_DIR on older Windows Vulkan SDKs) and how a hand-placed encoder behaves on a 12 GB gfx1031 card: https://github.com/Hugua700/old-amd-local-ai
Author
Owner

@Hugua700 commented on GitHub (Oct 15, 2026):

One follow-up, since yours is the first report I have seen of this on a Windows AMD machine under VRAM pressure -- and it may be a different problem from the one the open PR solves.

If the Codex session is still around, could you paste what it actually changed (which files, or the diff)? It is worth capturing rather than leaving it local, for two reasons:

  • PR #1789 makes the CPU encoder reachable as --vision cpu, but the encoder still has to be built by hand from tools/vision first. If what Codex gave you is something more automatic -- a setup prompt, or falling back to CPU when the encoder does not fit beside the model -- then that is a different answer from what #1789 does today, and a better one for the "non-technical user" case you describe.
  • An out-of-VRAM failure at launch on an 8 GB card is worth pinning down on its own. Whether the encoder was competing with the model for the same VRAM, or the CPU fallback simply was not reachable on Windows AMD, decides which fix is correct.

No obligation -- if a diff is awkward, even a short note of which files it touched, plus the exact error text from before the fix, would be enough to tell which of the two it is.

<!-- gh-comment-id:6189105236 --> @Hugua700 commented on GitHub (Oct 15, 2026): One follow-up, since yours is the first report I have seen of this on a Windows **AMD** machine under VRAM pressure -- and it may be a different problem from the one the open PR solves. If the Codex session is still around, could you paste what it actually changed (which files, or the diff)? It is worth capturing rather than leaving it local, for two reasons: * PR #1789 makes the CPU encoder *reachable* as `--vision cpu`, but the encoder still has to be built by hand from `tools/vision` first. If what Codex gave you is something more automatic -- a setup prompt, or falling back to CPU when the encoder does not fit beside the model -- then that is a different answer from what #1789 does today, and a better one for the "non-technical user" case you describe. * An out-of-VRAM failure **at launch** on an 8 GB card is worth pinning down on its own. Whether the encoder was competing with the model for the same VRAM, or the CPU fallback simply was not reachable on Windows AMD, decides which fix is correct. No obligation -- if a diff is awkward, even a short note of which files it touched, plus the exact error text from before the fix, would be enough to tell which of the two it is.
Author
Owner

@ogwtak commented on GitHub (Oct 16, 2026):

Thank you for your response. I understand that the main thread is moved to #1789 .
m(_ _)m

Separately, I asked Codex to prepare reports describing the work it performed on each PC, as requested. I’ve attached them here.
I hope they help clarify what was changed and prove useful for your investigation.

Strata_VRAM_fix_report_for_issue_1155.txt

Windows_AMDStrixHalo_CPU_Vision_Setup_Procedure_EN.txt

<!-- gh-comment-id:6205287325 --> @ogwtak commented on GitHub (Oct 16, 2026): Thank you for your response. I understand that the main thread is moved to [#1789 ](https://github.com/Niko1221/Strata/pull/1789). m(_ _)m Separately, I asked Codex to prepare reports describing the work it performed on each PC, as requested. I’ve attached them here. I hope they help clarify what was changed and prove useful for your investigation. [Strata_VRAM_fix_report_for_issue_1155.txt](https://github.com/user-attachments/files/33519393/Strata_VRAM_fix_report_for_issue_1155.txt) [Windows_AMDStrixHalo_CPU_Vision_Setup_Procedure_EN.txt](https://github.com/user-attachments/files/33519470/Windows_AMDStrixHalo_CPU_Vision_Setup_Procedure_EN.txt)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#486
No description provided.