Free | No tracking | Every fact with a source|German and English

Glossary / Software and setup

PyTorch – explained simply

PyTorch is the compute library that most image, video, and audio AIs are built on; it brings the models to your graphics card.

Also: torch, torchvision, torchaudio

PyTorch does the actual computing work: It loads a model’s weights and runs the calculations on the CPU or GPU. Tools like ComfyUI are basically interfaces that control PyTorch.

PyTorch comes in several variants: for different CUDA versions (Nvidia), for ROCm (AMD), and CPU-only. The selection page on pytorch.org generates the right install command. The current stable version requires at least Python 3.10.

To check whether the graphics card is recognized, use Python with import torch and then torch.cuda.is_available(). If it returns False, the CPU-only version is usually installed or the driver is too old.

What does that mean for you? If a tool only uses the CPU even though you have an Nvidia card, the wrong PyTorch variant is very often installed.

Related terms

Errors where that matters

Sources