## What this teaches

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

## The problem

Issue Tencent-Hunyuan/HunyuanVideo#22 (closed, 8 comments): I'm encountering the following error while running the preprocess_text_encoder_tokenizer function in the preprocess_text_encoder_tokenizer_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 without raising the AssertionError. It would be helpful if PyTorch

## What worked (verified answer)

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

gh:Tencent-Hunyuan/HunyuanVideo#22 - https://github.com/Tencent-Hunyuan/HunyuanVideo/issues/22
