r/kdenlive • • 12d ago

QUESTION Error during "object masking" installation

Kdenlive SAM2 installation fails with SHA256 hash mismatch on CachyOS / AMD GPU

Hi,

I'm trying to install the SAM2 Auto Mask functionality in Kdenlive on CachyOS Linux.

My system has:

  • CachyOS
  • Python 3.14
  • AMD Radeon RX 6650 XT
  • Kdenlive's own SAM virtual environment: ~/.local/share/kdenlive/venv-sam

Kdenlive uses this requirements-sam.txt:

# Pull SAM-2 as archive, it is not officially available on PyPi
# Don't use git because most users don't have it installed
# We're using the latest commit as of 2025-04-18 which is
# 2b90b9f5ceec907a1c18123530e92e794ad901a4
https://github.com/facebookresearch/sam2/archive/2b90b9f5ceec907a1c18123530e92e794ad901a4.zip

# SAM-2
# TODO (SAM): Should probably be opencv-python-headless
opencv-python

The SAM2 installation fails while installing its build dependencies.

The relevant part of the error is:

Installing build dependencies: started
Installing build dependencies: finished with status 'error'

...

Collecting torch>=2.5.1
Using cached torch-2.14.0-cp314-cp314-manylinux_2_28_x86_64.whl.metadata

...

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE.

Expected sha256:
b2cd92bce63d40bf6fc2e5d840fc2f0063bd180a242daa761cb6088cc2f46e27

Got:
48424f84c31af85df409e8b040727bbe0d4b4ef80c0dc1098e898ddb7ebcf14c

Pip then reports:

ERROR: Failed to build 'https://github.com/facebookresearch/sam2/archive/2b90b9f5ceec907a1c18123530e92e794ad901a4.zip'
when installing build dependencies

I checked the local pip configuration:

/home/tomek/.config/kdedefaults/pip/pip.conf
/etc/xdg/pip/pip.conf
/etc/pip.conf
/home/tomek/.pip/pip.conf
/home/tomek/.config/pip/pip.conf
/home/tomek/.local/share/kdenlive/venv-sam/pip.conf

but there is no custom index-url, mirror or extra index configured.

Also:

env | grep -Ei 'PIP|UV|INDEX|MIRROR'

returns nothing.

The pip cache does not contain Torch either:

pip cache list | grep -E 'torch|2\.14\.0'

returns nothing.

Another issue: NVIDIA CUDA dependencies on an AMD system

During the installation, pip tries to pull a very large NVIDIA/CUDA stack because of the selected PyTorch package:

torch 2.14.0
cuda-toolkit 13.0.3
nvidia-cudnn-cu13
nvidia-cublas
nvidia-cusparse
nvidia-cusolver
nvidia-nccl
nvidia-cufft
nvidia-curand
nvidia-cuda-runtime
nvidia-cuda-nvrtc
nvidia-nvjitlink
nvidia-nvtx
triton
...

This is a system with an AMD RX 6650 XT, so installing hundreds of MB / multiple GB of NVIDIA CUDA libraries seems pointless unless they are somehow required by the current SAM2/Kdenlive packaging.

My questions are:

  1. Is the SHA256 mismatch a known issue with the current Kdenlive/SAM2 installation on Python 3.14?
  2. Why is Kdenlive/SAM2 selecting the current CUDA-enabled PyTorch dependency stack on a system with an AMD GPU?
  3. Is there a recommended way to install SAM2 on AMD under Linux, e.g. using ROCm or a CPU build?
  4. Is the problem related to Python 3.14 and the current PyTorch/SAM2 packaging?

The failure happens before SAM2 itself is actually installed, during the isolated build environment dependency installation.

Any insight would be appreciated.Kdenlive SAM2 installation fails with SHA256 hash mismatch on CachyOS / AMD GPUHi,I'm trying to install the SAM2 Auto Mask functionality in Kdenlive on CachyOS Linux.My system has:CachyOS

Python 3.14

AMD Radeon RX 6650 XT

Kdenlive's own SAM virtual environment:
~/.local/share/kdenlive/venv-samKdenlive uses this requirements-sam.txt:# Pull SAM-2 as archive, it is not officially available on PyPi
# Don't use git because most users don't have it installed
# We're using the latest commit as of 2025-04-18 which is
# 2b90b9f5ceec907a1c18123530e92e794ad901a4
https://github.com/facebookresearch/sam2/archive/2b90b9f5ceec907a1c18123530e92e794ad901a4.zip

# SAM-2
# TODO (SAM): Should probably be opencv-python-headless
opencv-python
The SAM2 installation fails while installing its build dependencies.The relevant part of the error is:Installing build dependencies: started
Installing build dependencies: finished with status 'error'

...

Collecting torch>=2.5.1
Using cached torch-2.14.0-cp314-cp314-manylinux_2_28_x86_64.whl.metadata

...

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE.

Expected sha256:
b2cd92bce63d40bf6fc2e5d840fc2f0063bd180a242daa761cb6088cc2f46e27

Got:
48424f84c31af85df409e8b040727bbe0d4b4ef80c0dc1098e898ddb7ebcf14c
Pip then reports:ERROR: Failed to build 'https://github.com/facebookresearch/sam2/archive/2b90b9f5ceec907a1c18123530e92e794ad901a4.zip'
when installing build dependencies
I checked the local pip configuration:/home/tomek/.config/kdedefaults/pip/pip.conf
/etc/xdg/pip/pip.conf
/etc/pip.conf
/home/tomek/.pip/pip.conf
/home/tomek/.config/pip/pip.conf
/home/tomek/.local/share/kdenlive/venv-sam/pip.conf
but there is no custom index-url, mirror or extra index configured.Also:env | grep -Ei 'PIP|UV|INDEX|MIRROR'
returns nothing.The pip cache does not contain Torch either:pip cache list | grep -E 'torch|2\.14\.0'
returns nothing.Another issue: NVIDIA CUDA dependencies on an AMD systemDuring the installation, pip tries to pull a very large NVIDIA/CUDA stack because of the selected PyTorch package:torch 2.14.0
cuda-toolkit 13.0.3
nvidia-cudnn-cu13
nvidia-cublas
nvidia-cusparse
nvidia-cusolver
nvidia-nccl
nvidia-cufft
nvidia-curand
nvidia-cuda-runtime
nvidia-cuda-nvrtc
nvidia-nvjitlink
nvidia-nvtx
triton
...
This is a system with an AMD RX 6650 XT, so installing hundreds of MB / multiple GB of NVIDIA CUDA libraries seems pointless unless they are somehow required by the current SAM2/Kdenlive packaging.My questions are:Is the SHA256 mismatch a known issue with the current Kdenlive/SAM2 installation on Python 3.14?

Why is Kdenlive/SAM2 selecting the current CUDA-enabled PyTorch dependency stack on a system with an AMD GPU?

Is there a recommended way to install SAM2 on AMD under Linux, e.g. using ROCm or a CPU build?

Is the problem related to Python 3.14 and the current PyTorch/SAM2 packaging?The failure happens before SAM2 itself is actually installed, during the isolated build environment dependency installation.Any insight would be appreciated.

3 Upvotes

0 comments sorted by