Skip to content

[Bug] Studio auto-downloads Torch cu130 and proceeds to have a version mismatch != cu126 #5827

Closed

Description

@Murasakini

Note: Please do not remove the questions. Answer beside them.

  1. Did you update? pip install --upgrade unsloth unsloth_zoo - Attempted a Fresh install after seeing errors (did the whole uninstall)
  2. Colab or Kaggle or local / cloud - Local
  3. Number GPUs used, use nvidia-smi - 1 (5090)
  4. Which notebook? Please link! - Unrelated
  5. Which Unsloth version, TRL version, transformers version, PyTorch version? v0.1.42-beta
  6. Which trainer? SFTTrainer, GRPOTrainer etc - Unrelated
  🦥 Unsloth Studio Installer (Windows)
  ────────────────────────────────────────────────────

  winget         available
  python         Python 3.13 already installed
                 preserving existing environment for rollback...
                 previous environment preserved for rollback
  venv           creating Python 3.13 virtual environment
                 C:\Users\xxx\.unsloth\studio\unsloth_studio
  gpu            NVIDIA GPU detected
                 installing PyTorch (https://download.pytorch.org/whl/cu130)...
                 installing unsloth (this may take a few minutes)...
  setup          running unsloth studio setup...

  🦥 Unsloth Studio Setup
  ────────────────────────────────────────────────────
  gpu            NVIDIA GPU detected
  long paths     enabled
  git            git version 2.53.0.windows.1
  cmake          cmake version 4.2.3-msvc3
  vs             Visual Studio 17 2022 (filesystem (BuildTools))
                 cl.exe: C:\Program Files (x86)\Microsoft Visual
Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe
                 GPU Compute Capability = 12.0 (sm_120)
                 Persisted CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1 to user environment
                 Set CUDA_PATH_V13_1 (cleared other CUDA_PATH_V* vars)
  cuda           C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\bin\nvcc.exe
                 CUDA_PATH      = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1
                 CudaToolkitDir = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.1\
                 Node v24.14.1 and npm 11.11.0 already meet requirements.
  node           v24.14.1 | npm 11.11.0
                 bun already installed (1.3.12)
                 Python 3.13

  system         prerequisites ready

  frontend       up to date
                 installing OXC validator runtime...
  oxc runtime    installed

                 setting up Python environment...
                 Using C:\Users\xxx\AppData\Local\Programs\Python\Python313\python.exe (Python 3.13.13)
                 Stale venv detected (torch cu130 != required cu126).
   [ERROR] The existing Studio environment needs repair.
           Re-run install.ps1 so it can replace the environment safely with rollback.
[ERROR] unsloth studio setup failed (exit code 1)
                 restoring previous environment after failed install...
                 restored previous environment

Activity

  1. XaszD commented on May 28, 2026

    @XaszD

    same here, also 5090

  2. isbannn commented on May 28, 2026

    @isbannn

    same problem here 5070ti

  3. Elsayanor commented on May 28, 2026

    @Elsayanor

    same problem here, 6000pro

  4. Datta0 commented on May 29, 2026

    @Datta0
    Contributor

    hey all, this is fixed in/via #5817
    It should be a part of the next pypi release.

  5. XaszD commented on May 29, 2026

    @XaszD

    It's fixed, but now the models are being loaded on the CPU for some reason

  6. ntoff commented on May 31, 2026

    @ntoff
                     Using C:\Users\Norah\AppData\Local\Programs\Python\Python313\python.exe (Python 3.13.13)
                     Stale venv detected (torch cu130 != required cu126).
       [ERROR] The existing Studio environment needs repair.
               Re-run install.ps1 so it can replace the environment safely with rollback.
    [ERROR] unsloth studio setup failed (exit code 1)
                     restoring previous environment after failed install...
                     restored previous environment```
    
    Just tried to install unsloth and I'm getting the same error
    
  7. Murasakini commented on Jun 6, 2026

    @Murasakini
    Author

    Issue regarding Torch versioning (cu130 downloaded) and CPU-ONLY inference seems to be resolved on latest v0.1.44-beta build for 5090s.

    Feel free to close after confirming for the other GPUs as well.

      ────────────────────────────────────────────────────
    
      winget         available
      python         Python 3.13 already installed
                     preserving existing environment for rollback...
                     previous environment preserved for rollback
      venv           creating Python 3.13 virtual environment
                     C:\Users\xxx\.unsloth\studio\unsloth_studio
      gpu            NVIDIA GPU detected
                     installing PyTorch (https://download.pytorch.org/whl/cu130)...
                     installing unsloth (this may take a few minutes)...
      setup          running unsloth studio setup...
    
      🦥 Unsloth Studio Setup
      ────────────────────────────────────────────────────
      gpu            NVIDIA GPU detected
      long paths     enabled
      git            git version 2.54.0.windows.1
      cmake          cmake version 4.2.3-msvc3
      vs             Visual Studio 17 2022 (filesystem (BuildTools))
                     cl.exe: C:\Program Files (x86)\Microsoft Visual
    Studio\2022\BuildTools\VC\Tools\MSVC\14.44.35207\bin\Hostx64\x64\cl.exe
                     Node v24.14.1 and npm 11.11.0 already meet requirements.
      node           v24.14.1 | npm 11.11.0
                     bun already installed (1.3.12)
                     Python 3.13
    
      system         prerequisites ready
    
      frontend       up to date
                     installing OXC validator runtime...
      oxc runtime    installed
    
                     setting up Python environment...
                     Python found: C:\Users\xxx\AppData\Local\Programs\Python\Python313\python.exe
                     reusing existing virtual environment at C:\Users\xxx\.unsloth\studio\unsloth_studio
                     Python 3.13.13
                     TORCHINDUCTOR_CACHE_DIR set to C:\tc (avoids MAX_PATH issues)
                     installing PyTorch with CUDA support (cu130)...
                     (This download is ~2.8 GB -- may take a few minutes)
                     installing Triton for Windows...
                     Triton for Windows installed (enables torch.compile)
                     could not rename unsloth.exe (The process cannot access the file because it is being used by another
    process.); pip may fail with WinError 32
                     running ordered dependency installation...
      deps           [====================] 10/10  finalizing
      deps           installed
    
                     pre-installing transformers 5.3.0 for newer model support...
      transformers   5.3.0 pre-installed
                     pre-installing transformers 5.5.0 for Gemma 4 support...
      transformers   5.5.0 pre-installed
    
                     installing prebuilt llama.cpp bundle (preferred path)...
                     Existing llama.cpp install detected -- validating staged prebuilt update before replacement
      llama.cpp      prebuilt installed and validated
                     installed release: ggml-org/llama.cpp@b9536
                     OpenSSL dev install skipped -- prebuilt llama.cpp already validated
    
      llama.cpp      prebuilt (validated)
      ────────────────────────────────────────────────────
      Unsloth Studio Setup Complete
      ────────────────────────────────────────────────────
      launch         unsloth studio -H 0.0.0.0 -p 8888
    
                     Created Unsloth Studio shortcut
    
      Start Unsloth Studio now? [Y/n]: n
      launch         to start later, run:
                     unsloth studio -p 8888
                     (add -H 0.0.0.0 to allow network / cloud access)

    {"timestamp": "2026-06-06T03:12:18.348179Z", "level": "info", "event": "GGUF size: 21.3 GB, est. KV cache: 5.4 GB, context: 258816, GPUs free: [(0, 32187)], selected: [0], fit: False"}

    Image
    +-----------------------------------------------------------------------------------------+
    | NVIDIA-SMI 610.47                 KMD Version: 610.47        CUDA UMD Version: 13.3     |
    +-----------------------------------------+------------------------+----------------------+
    | GPU  Name                  Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
    |                                         |                        |               MIG M. |
    |=========================================+========================+======================|
    |   0  NVIDIA GeForce RTX 5090      WDDM  |   00000000:01:00.0 Off |                  N/A |
    | 31%   34C    P8              6W /  402W |   29314MiB /  32607MiB |      0%      Default |
    |                                         |                        |                  N/A |
    +-----------------------------------------+------------------------+----------------------+
    
    +-----------------------------------------------------------------------------------------+
    | Processes:                                                                              |
    |  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
    |        ID   ID                                                               Usage      |
    |=========================================================================================|
    |    0   N/A  N/A         1029520      C   ...\bin\Release\llama-server.exe      N/A      |
    +-----------------------------------------------------------------------------------------+
  8. oobabooga commented on Jul 16, 2026

    @oobabooga
    Member

    Fixed by #5817, in v0.1.44-beta and later.

    It wasn't GPU-specific. The 610.x Windows drivers report the CUDA version as "CUDA UMD Version" instead of the old "CUDA Version", and the setup validator didn't parse the new header, so it fell back to cu126 and rejected the cu130 venv the installer had just built. The 5070 Ti and 6000 Pro hit the same thing, and the same fix covers them.

    @ntoff your log is from before the fix. Update to v0.1.44-beta and reinstall clean.

    Nothing runs on CPU on the fixed build. The fit line in that log means the model is pinned fully onto the GPU, not offloaded, which @Murasakini's nvidia-smi confirms.

    Closing as a duplicate of #5812. Thanks all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions