[GH-ISSUE #3810] [Engine] setup crashes on the 0.1.48 Windows CUDA package: BUILD.json "vision_archs" is a string, prebuilt_vision reads it as a list #1609

Closed
opened 2026-11-04 01:52:37 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Poro789 on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3810

The problem

On Windows, setting up Strata 0.2.3 with the ready-made engine and images on stops inside setup.py. The engine and the CUDA libraries are installed by then; what does not happen is the rest of setup (the run config is never written):

  [ok] ready-made engine 0.1.48 from the update feed (0.1.48-windows-x86_64-cuda-cuda13)
  Installing NVIDIA CUDA libraries (cuBLAS, CUDA runtime; ~0.4 GB) ...
  [ok] NVIDIA CUDA libraries (cuBLAS, CUDA runtime; ~0.4 GB) installed
Traceback (most recent call last):
  File "D:\Github-Projects\strata-main\setup.py", line 9151, in <module>
    sys.exit(main())
  File "D:\Github-Projects\strata-main\setup.py", line 8645, in main
    llama, eng, meta, lib_dirs, gpu, vision = engine_step(a, gpu, hip, amd, cuda_tk, vision)
  File "D:\Github-Projects\strata-main\setup.py", line 7237, in engine_step
    vision = prebuilt_vision(json.loads((eng / "BUILD.json").read_text(encoding="utf-8")), gpu, vision)
  File "D:\Github-Projects\strata-main\setup.py", line 5401, in prebuilt_vision
    va = [int(x) for x in meta.get("vision_archs", meta.get("archs", []))]
ValueError: invalid literal for int() with base 10: ';'

Line numbers are from tag v0.2.3 (5c8dd322), unmodified.

What the package says

engine\BUILD.json in the fetched component 0.1.48-windows-x86_64-cuda-cuda13 is 16 lines long and uses two different formats in one file - a list for archs, a joined string for vision_archs. Quoted whole:

{
 "version": "0.1.48",
 "source": "prebuilt",
 "commit": "6f8800aefe27",
 "archs": [
  75,
  86,
  89,
  120
 ],
 "ptx": true,
 "cuda": "13.0",
 "vision": "gpu-cuda13",
 "portable": true,
 "vision_archs": "75;86;89;120"
}

(The "source": "prebuilt" line is stamped in by setup itself, setup.py:4143-4145; the rest is as the component shipped it.)

prebuilt_vision iterates that value and calls int() on each element, so it sees the characters 7, 5, ; and stops at the ;.

Why the writer and the reader disagree (read from the code, not tested)

  • The writer: packaging/package_engine.py:120-129 (stamp_vision_archs, whose docstring says the Windows build recipes call it after building strata-vision.exe) stores ";".join(...).
  • The readers expect a list: prebuilt_vision (setup.py:5401) and reader_archs (setup.py:4416-4427, which tests isinstance(..., list) - with a string it returns [] quietly instead of crashing).
  • The tests only feed lists (tools/test_setup_choices.py:33-56), and the HIP Windows packager writes a list (tools/hip/package_windows.py:181).

The joined-string form looks new with this package: the 0.1.45 Windows component's BUILD.json has no vision_archs key at all, so prebuilt_vision fell back to archs (a list) and never saw a string. That is the only difference I can point at for "why now".

Who it hits

Windows, an NVIDIA card, the ready-made engine, and images on - --vision was not passed at all. The default answer to the images question is yes (setup.py:7277-7295), and yes becomes the GPU encoder on a card of 23.5 GB or more (setup.py:7298-7299, IMAGES_GPU_ENCODER_MIN_VRAM_GB at :2982); my card is 32 GB. prebuilt_vision returns before the failing line when the vision mode is not gpu, so --vision no / --vision cpu should not reach it - read from the code, not tested.

What I ran

  • Windows 11 Pro 10.0.26300, RTX 4080 SUPER (sm_89), driver 617.42, Python 3.12.9, 64 GB RAM.
  • A fresh git clone checked out at tag v0.2.3 (5c8dd322), no local changes at the time of the crash.
  • START-HERE.bat --setup --model IQ3_S --context 262144 --vram-reserve-mib 1536 --experimental-speed-projection on --no-start --yes

The engine download and the CUDA libraries passed; the traceback above followed.

How I got past it (a workaround I ran, not a proposal for the fix)

Three lines in prebuilt_vision so it also accepts the joined-string form, the way packaging/package_engine.py:64 (_arch_numbers) already does. With that, setup completed: the run config was written with the values I asked for, and prebuilt_vision still answered gpu for sm_89 (the arch list covers it), so the GPU image encoder was kept rather than downgraded to the CPU one.

Not run: starting the model on the new engine (I stopped before starting it), Linux, the AMD/HIP path, the .exe installer, and a machine with no earlier config.

Two places it could be fixed (your call)

Either teach the readers both forms - the parser that handles both already exists in the same repository (_arch_numbers) - or have stamp_vision_archs write a list, which is what both readers and the existing tests expect. If it is the second, reader_archs and test_setup_choices.py would seem the places to cover it.

I searched the open and closed issues and pull requests for vision_archs, invalid literal for int, 0.1.48 and ValueError setup.py before writing this and found nothing about this failure.

Originally created by @Poro789 on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3810 ## The problem On Windows, setting up Strata 0.2.3 with the ready-made engine and images on stops inside `setup.py`. The engine and the CUDA libraries are installed by then; what does not happen is the rest of setup (the run config is never written): ``` [ok] ready-made engine 0.1.48 from the update feed (0.1.48-windows-x86_64-cuda-cuda13) Installing NVIDIA CUDA libraries (cuBLAS, CUDA runtime; ~0.4 GB) ... [ok] NVIDIA CUDA libraries (cuBLAS, CUDA runtime; ~0.4 GB) installed Traceback (most recent call last): File "D:\Github-Projects\strata-main\setup.py", line 9151, in <module> sys.exit(main()) File "D:\Github-Projects\strata-main\setup.py", line 8645, in main llama, eng, meta, lib_dirs, gpu, vision = engine_step(a, gpu, hip, amd, cuda_tk, vision) File "D:\Github-Projects\strata-main\setup.py", line 7237, in engine_step vision = prebuilt_vision(json.loads((eng / "BUILD.json").read_text(encoding="utf-8")), gpu, vision) File "D:\Github-Projects\strata-main\setup.py", line 5401, in prebuilt_vision va = [int(x) for x in meta.get("vision_archs", meta.get("archs", []))] ValueError: invalid literal for int() with base 10: ';' ``` Line numbers are from tag `v0.2.3` (`5c8dd322`), unmodified. ## What the package says `engine\BUILD.json` in the fetched component `0.1.48-windows-x86_64-cuda-cuda13` is 16 lines long and uses two different formats in one file - a list for `archs`, a joined string for `vision_archs`. Quoted whole: ```json { "version": "0.1.48", "source": "prebuilt", "commit": "6f8800aefe27", "archs": [ 75, 86, 89, 120 ], "ptx": true, "cuda": "13.0", "vision": "gpu-cuda13", "portable": true, "vision_archs": "75;86;89;120" } ``` (The `"source": "prebuilt"` line is stamped in by setup itself, `setup.py:4143-4145`; the rest is as the component shipped it.) `prebuilt_vision` iterates that value and calls `int()` on each element, so it sees the characters `7`, `5`, `;` and stops at the `;`. ## Why the writer and the reader disagree (read from the code, not tested) - The writer: `packaging/package_engine.py:120-129` (`stamp_vision_archs`, whose docstring says the Windows build recipes call it after building `strata-vision.exe`) stores `";".join(...)`. - The readers expect a list: `prebuilt_vision` (`setup.py:5401`) and `reader_archs` (`setup.py:4416-4427`, which tests `isinstance(..., list)` - with a string it returns `[]` quietly instead of crashing). - The tests only feed lists (`tools/test_setup_choices.py:33-56`), and the HIP Windows packager writes a list (`tools/hip/package_windows.py:181`). The joined-string form looks new with this package: the 0.1.45 Windows component's `BUILD.json` has no `vision_archs` key at all, so `prebuilt_vision` fell back to `archs` (a list) and never saw a string. That is the only difference I can point at for "why now". ## Who it hits Windows, an NVIDIA card, the ready-made engine, and images on - `--vision` was not passed at all. The default answer to the images question is yes (`setup.py:7277-7295`), and yes becomes the GPU encoder on a card of 23.5 GB or more (`setup.py:7298-7299`, `IMAGES_GPU_ENCODER_MIN_VRAM_GB` at `:2982`); my card is 32 GB. `prebuilt_vision` returns before the failing line when the vision mode is not `gpu`, so `--vision no` / `--vision cpu` should not reach it - read from the code, not tested. ## What I ran - Windows 11 Pro 10.0.26300, RTX 4080 SUPER (`sm_89`), driver 617.42, Python 3.12.9, 64 GB RAM. - A fresh `git clone` checked out at tag `v0.2.3` (`5c8dd322`), no local changes at the time of the crash. - `START-HERE.bat --setup --model IQ3_S --context 262144 --vram-reserve-mib 1536 --experimental-speed-projection on --no-start --yes` The engine download and the CUDA libraries passed; the traceback above followed. ## How I got past it (a workaround I ran, not a proposal for the fix) Three lines in `prebuilt_vision` so it also accepts the joined-string form, the way `packaging/package_engine.py:64` (`_arch_numbers`) already does. With that, setup completed: the run config was written with the values I asked for, and `prebuilt_vision` still answered `gpu` for `sm_89` (the arch list covers it), so the GPU image encoder was kept rather than downgraded to the CPU one. Not run: starting the model on the new engine (I stopped before starting it), Linux, the AMD/HIP path, the `.exe` installer, and a machine with no earlier config. ## Two places it could be fixed (your call) Either teach the readers both forms - the parser that handles both already exists in the same repository (`_arch_numbers`) - or have `stamp_vision_archs` write a list, which is what both readers and the existing tests expect. If it is the second, `reader_archs` and `test_setup_choices.py` would seem the places to cover it. I searched the open and closed issues and pull requests for `vision_archs`, `invalid literal for int`, `0.1.48` and `ValueError setup.py` before writing this and found nothing about this failure.
Author
Owner

@Poro789 commented on GitHub (Oct 23, 2026):

Confirmed fixed on the reporting machine. With the tree checked out at v0.2.3.1 and my local workaround removed:

  • Passed: prebuilt_vision called directly with this engine's real engine/BUILD.json ("vision_archs": "75;86;89;120") and gpu["arch"]=89 returns gpu — no ValueError; python tools/test_setup_choices.py (54 tests, OK) and python tools/test_setup_amd.py (52 tests, OK).
  • Not run here: a full --setup re-run (the engine and the run config are already in place), Linux, and the AMD/HIP path.

Closing as completed. Thanks for the fast fix.

<!-- gh-comment-id:6368237577 --> @Poro789 commented on GitHub (Oct 23, 2026): Confirmed fixed on the reporting machine. With the tree checked out at v0.2.3.1 and my local workaround removed: - Passed: `prebuilt_vision` called directly with this engine's real `engine/BUILD.json` (`"vision_archs": "75;86;89;120"`) and `gpu["arch"]=89` returns `gpu` — no `ValueError`; `python tools/test_setup_choices.py` (54 tests, OK) and `python tools/test_setup_amd.py` (52 tests, OK). - Not run here: a full `--setup` re-run (the engine and the run config are already in place), Linux, and the AMD/HIP path. Closing as completed. Thanks for the fast fix.
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#1609
No description provided.