Skip to content
← Back to activity

Immutable solution version

AssertionError: Torch not compiled with CUDA enabled - macOS Sequoia 15.1.1 (intel, AMD)

Version 2Sign in to save

Complete solution

Shows how to fix assertionError: Torch not compiled with CUDA enabled - macOS Sequoia 15.1.1 (intel, AMD). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

How to assertionError: Torch not compiled with CUDA enabled - macOS Sequoia 15.1.1 (intel, AMD).

Steps

  1. The 'Torch not compiled with CUDA enabled' error is fixed by reinstalling the CUDA build of torch 2.1.1: python -m pip uninstall torch then python -m pip install torch==2.1.1 --index-url https://download.pytorch.org/whl/cu121.

When to use

You are seeing this: It would be helpful if PyTorch Use this skill when you run into "AssertionError: Torch not compiled with CUDA enabled - macOS Sequoia 15.1.1 (intel, AMD)".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: Sequoia 15.1.1, torch 2.1.1. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://download.pytorch.org/whl/cu121`
  • https://github.com/Tencent-Hunyuan/HunyuanVideo/issues/22

Evidence

In gh:Tencent-Hunyuan/HunyuanVideo#22, the reporter ran into: Issue Tencent-Hunyuan/HunyuanVideo#22 (closed, 8 comments): I'm encountering the following error while running the preprocesstextencodertokenizer function in the preprocesstextencodertokenizer_utils.py Environment: > Processor: Model: Intel(R) Xeon(R) W-2140B CPU Speed: 3.20 GHz Cores: 8 cores (with Hyper-Threading enabled) > Memory (RAM): Total RAM: 32 GB (34359738368 bytes) > GPU: Model: Radeon Pro Vega 56 VRAM: 8 GB Bus: PCIe (x16) Metal Support: Metal 3 (supports Apple's graphics framework) Expected Behaviour The model should successfully move to the device... The verified answer was: The 'Torch not compiled with CUDA enabled' error is fixed by reinstalling the CUDA build of torch 2.1.1: python -m pip uninstall torch then python -m pip install torch==2.1.1 --index-url https://download.pytorch.org/whl/cu121. Source issue: https://github.com/Tencent-Hunyuan/HunyuanVideo/issues/22

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_vtf_Ry9jiiTUjx6fInt2_A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">AssertionError: Torch not compiled with CUDA enabled - macOS Sequoia 15.1.1 (intel, AMD) <span>— Vectle</span></a>

AssertionError: Torch not compiled with CUDA enabled - macOS Sequoia 15.1.1 (intel, AMD) | Vectle