When running `pip install -r requirements.txt` during an update, the bare
`torch`/`torchvision`/`torchaudio` entries can cause pip to overwrite
ROCm, DirectML, XPU, or other platform-specific torch builds with the
default PyPI (CUDA) packages.
This adds pip constraints to pin torch packages to their current versions
when a non-standard build variant (e.g. +rocm, +xpu) is detected,
preventing the update from breaking the user's GPU setup.
Fixes#14902
Co-authored-by: Cursor <cursoragent@cursor.com>
This should fix the problem with the portable updater not working with portables created from a separate branch on the repo.
This does not affect any current portables who were all created on the master branch.