mirror of
https://github.com/guillaumemeyer/watermarks-remover.git
synced 2026-08-22 13:11:57 +02:00
Three independent failure modes from #117: - $ErrorActionPreference 'Stop' + 2>$null on a native command aborts the script on torch's harmless stderr warnings (e.g. "Failed to initialize NumPy" when torch is installed before numpy). Run the probes through a new Invoke-NativeQuiet helper that lowers EAP to 'Continue' for the block and restores it afterwards. - The wheel index tag was derived from the driver's CUDA version, e.g. cu131 for a 13.1 driver, which does not exist (HTTP 403) and silently fell back to the default index, i.e. the CPU build on Windows. Probe the published indices and pick the highest one <= driver that answers HTTP 200; cu126 is still forced below compute capability 7.5. - Installing torch alone let requirements-ctrlregen.txt resolve torchvision from PyPI, and torchvision pins an exact torch, so pip replaced the +cu build with a +cpu one while the script still exited 0. Install torch AND torchvision together from the chosen index, and verify after the requirements install that torch.cuda.is_available() is true - if a GPU was detected but torch ends up CPU-only, warn loudly and exit non-zero. Also add a CI step (windows-latest, pwsh) that parses the setup .ps1 scripts and asserts the post-install CUDA verification survives. Fixes #117