Skip to content

fix: use --torch-backend instead of --extra-index-url for dep compilation#373

Merged
bigcat88 merged 1 commit intomainfrom
fix-pin-deps-torch-backend
Mar 13, 2026
Merged

fix: use --torch-backend instead of --extra-index-url for dep compilation#373
bigcat88 merged 1 commit intomainfrom
fix-pin-deps-torch-backend

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

The old --extra-index-url approach caused uv to resolve any package from the PyTorch wheel index when it happened to be available there, not just torch-ecosystem packages. This is the root cause of #189.

This replaces --extra-index-url in the compile step with uv's --torch-backend flag, which routes only torch, torchaudio, torchvision, and torchsde to the PyTorch index. Everything else resolves from PyPI as expected.

The --extra-index-url is still used at install time (install_deps, fetch_dep_wheels, etc.) where pinned versions from the compiled file prevent any confusion.

Also pins uv>=0.6.0 in pyproject.toml since that's the minimum version supporting --torch-backend.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #373      +/-   ##
==========================================
+ Coverage   54.51%   54.59%   +0.08%     
==========================================
  Files          32       32              
  Lines        3603     3610       +7     
==========================================
+ Hits         1964     1971       +7     
  Misses       1639     1639              
Files with missing lines Coverage Δ
comfy_cli/uv.py 55.89% <100.00%> (+1.20%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bigcat88 bigcat88 marked this pull request as ready for review March 13, 2026 07:31
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. bug Something isn't working labels Mar 13, 2026
…compilation

The old --extra-index-url approach caused uv to resolve any package from
the PyTorch wheel index when available there, not just torch-ecosystem
packages. Replace it with --torch-backend which routes only torch/
torchaudio/torchvision/torchsde to the PyTorch index.

Pin uv>=0.6.9 as the minimum version supporting --torch-backend.

Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
@bigcat88 bigcat88 force-pushed the fix-pin-deps-torch-backend branch from 109bc26 to e0e50ef Compare March 13, 2026 07:43
@bigcat88 bigcat88 merged commit 739e593 into main Mar 13, 2026
14 checks passed
@bigcat88 bigcat88 deleted the fix-pin-deps-torch-backend branch March 13, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant