pytorch - ✅(Solved) Fix Hash mismatch when installing pytorch 2.9.0 with cuda 12.9 using pip [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
pytorch/pytorch#179554Fetched 2026-04-08 03:00:31
View on GitHub
Comments
1
Participants
2
Timeline
25
Reactions
0
Author
Timeline (top)
mentioned ×10subscribed ×10labeled ×4commented ×1

Error Message

Looking in indexes: https://download.pytorch.org/whl/cu129 Collecting torch==2.9.0+cu129 Downloading https://download-r2.pytorch.org/whl/cu129/torch-2.9.0%2Bcu129-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (30 kB) ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them. torch==2.9.0+cu129 from https://download-r2.pytorch.org/whl/cu129/torch-2.9.0%2Bcu129-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=6a2f119afeefe66eef75484f008b1a240952e45b24899d27d281961e8a395458: Expected sha256 05df84ccec407908cb70f89d6c2675b8220661f23d7de0cf899f4401f8ab2798 Got 2b0a3a5d37a8d7447e56e7e4e27280f881e805fbae79130fa8874bcfe6eae333

Fix Action

Fix / Workaround

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 24 On-line CPU(s) list: 0-23 Vendor ID: GenuineIntel Model name: Intel(R) Core(TM) Ultra 9 285HX CPU family: 6 Model: 198 Thread(s) per core: 1 Core(s) per socket: 24 Socket(s): 1 Stepping: 2 BogoMIPS: 6143.99 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves avx_vnni vnmi umip waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize flush_l1d arch_capabilities Virtualization: VT-x Hypervisor vendor: Microsoft Virtualization type: full L1d cache: 1.1 MiB (24 instances) L1i cache: 1.5 MiB (24 instances) L2 cache: 72 MiB (24 instances) L3 cache: 36 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-23 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Mitigation; Enhanced IBRS Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

PR fix notes

PR #2212: Adjust instance-segmentation YOLO models post-processing to fit old inference

Description (problem / solution / changelog)

What does this PR do?

<!-- Provide a clear and concise description of the changes -->

We detected drift of constant used for instance-segmentation post-processing for YOLO models - the value of mask binarization threshold in new inference was set to 0.0, compared to old value being 0.5.

Vibe check of couple of models indicated that the change help to minimise leak of segmentation masks on the edges, as well as generate smoother edges for masks.

<table> <tr> <th>threshold <pre>0.5</pre></th> <th>threshold <pre>0.0</pre></th> </tr> <tr> <td><img width="571" height="854" alt="image" src="https://github.com/user-attachments/assets/7f14a90f-7aa6-40f2-8dc9-3bd0cebcb562" /> </td> <td><img width="624" height="1123" alt="image" src="https://github.com/user-attachments/assets/df8af26e-7a15-44cf-bf51-71477d0cb158" /> </td> </tr> </table>

Type of Change

<!-- Please select one and delete the others, or describe if Other -->
  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other:

Testing

<!-- Describe how you tested your changes -->
  • I have tested this change locally
  • I have added/updated tests for this change

Test details:

<!-- Describe what tests were added/updated and what they cover -->

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in hard-to-understand areas
  • My changes generate no new warnings or errors
  • I have updated the documentation accordingly (if applicable)

Additional Context

<!-- Add any other context, screenshots, or notes about the PR here -->

Changed files

  • inference_models/docs/changelog.md (modified, +16/-0)
  • inference_models/inference_models/configuration.py (modified, +4/-0)
  • inference_models/inference_models/models/auto_loaders/auto_resolution_cache.py (modified, +5/-3)
  • inference_models/inference_models/models/auto_loaders/core.py (modified, +3/-1)
  • inference_models/inference_models/models/common/roboflow/post_processing.py (modified, +2/-2)
  • inference_models/inference_models/models/yololite/yololite_object_detection_onnx.py (modified, +15/-4)
  • inference_models/inference_models/models/yolov8/yolov8_instance_segmentation_onnx.py (modified, +3/-0)
  • inference_models/inference_models/models/yolov8/yolov8_instance_segmentation_torch_script.py (modified, +3/-0)
  • inference_models/inference_models/models/yolov8/yolov8_instance_segmentation_trt.py (modified, +3/-0)
  • inference_models/pyproject.toml (modified, +1/-1)
  • inference_models/tests/integration_tests/models/test_yololite_object_detection_predictions_onnx.py (modified, +10/-10)
  • inference_models/tests/integration_tests/models/test_yolov8_instance_segmentation_predictions_onnx.py (modified, +65/-0)
  • inference_models/tests/integration_tests/models/test_yolov8_instance_segmentation_predictions_torch.py (modified, +45/-0)
  • inference_models/tests/integration_tests/models/test_yolov8_instance_segmentation_predictions_trt.py (modified, +13/-6)
  • inference_models/uv.lock (modified, +35/-35)

Code Example

Looking in indexes: https://download.pytorch.org/whl/cu129
Collecting torch==2.9.0+cu129
  Downloading https://download-r2.pytorch.org/whl/cu129/torch-2.9.0%2Bcu129-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (30 kB)
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    torch==2.9.0+cu129 from https://download-r2.pytorch.org/whl/cu129/torch-2.9.0%2Bcu129-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=6a2f119afeefe66eef75484f008b1a240952e45b24899d27d281961e8a395458:
        Expected sha256 05df84ccec407908cb70f89d6c2675b8220661f23d7de0cf899f4401f8ab2798
             Got        2b0a3a5d37a8d7447e56e7e4e27280f881e805fbae79130fa8874bcfe6eae333
RAW_BUFFERClick to expand / collapse

🐛 Describe the bug

When trying to install pytorch 2.9.0 with cuda 12.9 via pip, a hash mismatch error occurs. It seams that the problem exists for the linux build, as installing from windows don't result in install errors.

Used command: pip install --force-reinstall --no-cache-dir torch==2.9.0+cu129 --index-url https://download.pytorch.org/whl/cu129

Pip output

Looking in indexes: https://download.pytorch.org/whl/cu129
Collecting torch==2.9.0+cu129
  Downloading https://download-r2.pytorch.org/whl/cu129/torch-2.9.0%2Bcu129-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (30 kB)
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    torch==2.9.0+cu129 from https://download-r2.pytorch.org/whl/cu129/torch-2.9.0%2Bcu129-cp312-cp312-manylinux_2_28_x86_64.whl#sha256=6a2f119afeefe66eef75484f008b1a240952e45b24899d27d281961e8a395458:
        Expected sha256 05df84ccec407908cb70f89d6c2675b8220661f23d7de0cf899f4401f8ab2798
             Got        2b0a3a5d37a8d7447e56e7e4e27280f881e805fbae79130fa8874bcfe6eae333

Tested systems:

  • Databricks 18.1 ML
  • WSL2 with Ubuntu
  • Alma Linux 9

Versions

Versions for WSL2:

Collecting environment information... PyTorch version: N/A Is debug build: N/A CUDA used to build PyTorch: N/A ROCM used to build PyTorch: N/A

OS: Ubuntu 24.04.4 LTS (x86_64) GCC version: (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0 Clang version: Could not collect CMake version: Could not collect Libc version: glibc-2.39

Python version: 3.12.3 (main, Mar 3 2026, 12:15:18) [GCC 13.3.0] (64-bit runtime) Python platform: Linux-6.6.87.2-microsoft-standard-WSL2-x86_64-with-glibc2.39 Is CUDA available: N/A CUDA runtime version: Could not collect CUDA_MODULE_LOADING set to: N/A GPU models and configuration: GPU 0: NVIDIA RTX PRO 4000 Blackwell Generation Laptop GPU Nvidia driver version: 573.71 cuDNN version: Could not collect Is XPU available: N/A HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: N/A Caching allocator config: N/A

CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Address sizes: 46 bits physical, 48 bits virtual Byte Order: Little Endian CPU(s): 24 On-line CPU(s) list: 0-23 Vendor ID: GenuineIntel Model name: Intel(R) Core(TM) Ultra 9 285HX CPU family: 6 Model: 198 Thread(s) per core: 1 Core(s) per socket: 24 Socket(s): 1 Stepping: 2 BogoMIPS: 6143.99 Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves avx_vnni vnmi umip waitpkg gfni vaes vpclmulqdq rdpid movdiri movdir64b fsrm md_clear serialize flush_l1d arch_capabilities Virtualization: VT-x Hypervisor vendor: Microsoft Virtualization type: full L1d cache: 1.1 MiB (24 instances) L1i cache: 1.5 MiB (24 instances) L2 cache: 72 MiB (24 instances) L3 cache: 36 MiB (1 instance) NUMA node(s): 1 NUMA node0 CPU(s): 0-23 Vulnerability Gather data sampling: Not affected Vulnerability Itlb multihit: Not affected Vulnerability L1tf: Not affected Vulnerability Mds: Not affected Vulnerability Meltdown: Not affected Vulnerability Mmio stale data: Not affected Vulnerability Reg file data sampling: Not affected Vulnerability Retbleed: Mitigation; Enhanced IBRS Vulnerability Spec rstack overflow: Not affected Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI Not affected Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected

Versions of relevant libraries: [pip3] No relevant packages [conda] Could not collect

cc @seemethere @malfet @atalman @tinglvv @nWEIdia

extent analysis

TL;DR

The hash mismatch error during PyTorch installation with CUDA 12.9 via pip can be resolved by checking the integrity of the downloaded package and potentially updating the package index or using a different installation method.

Guidance

  • Verify the package integrity by checking the hash of the downloaded wheel file against the expected hash provided in the error message.
  • Try updating the package index using pip install --upgrade pip and then reinstalling PyTorch.
  • Consider using a different installation method, such as installing from source or using a pre-built wheel from a trusted repository.
  • Check for any issues with the network connection or firewall that may be causing the hash mismatch.

Example

No code snippet is provided as the issue is related to package installation and not code execution.

Notes

The issue seems to be specific to the Linux build, and the error message indicates a hash mismatch. This could be due to a corrupted download or a issue with the package repository. The provided information does not suggest a specific code-related issue.

Recommendation

Apply workaround: Try installing PyTorch using a different method, such as installing from source or using a pre-built wheel from a trusted repository, to avoid the hash mismatch error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

pytorch - ✅(Solved) Fix Hash mismatch when installing pytorch 2.9.0 with cuda 12.9 using pip [1 pull requests, 1 comments, 2 participants]