fix(adopt): guard GPU installs with CPU-only Torch - #1287
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughLegacy Desktop adoption now detects incompatible Torch/GPU combinations, offers CPU fallback, persists that choice, and enforces it during standalone launches. Launch action data and adopted installation metadata are preserved through IPC and copy operations. ChangesAdopted Torch CPU fallback
Sequence Diagram(s)sequenceDiagram
participant User
participant StandaloneActions
participant useListAction
participant handleLaunch
participant TorchRepair
User->>StandaloneActions: select Launch
StandaloneActions->>TorchRepair: check adopted Torch mismatch
TorchRepair-->>StandaloneActions: return mismatch details
StandaloneActions->>User: request CPU fallback confirmation
User-->>StandaloneActions: confirm CPU mode
StandaloneActions->>useListAction: provide action data
useListAction->>handleLaunch: run launch with fallback data
handleLaunch->>TorchRepair: validate launch environment
TorchRepair-->>handleLaunch: return mismatch status
handleLaunch-->>User: launch with --cpu
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Incident evidence
The supplied Legacy Desktop files showed NVIDIA selected and empty ComfyUI launch arguments. The linked log then failed with
AssertionError: Torch not compiled with CUDA enabled.This means the incident was not caused by restoring a legacy
--cpulaunch argument. Instead, adoption accepted an environment whereimport torchsucceeded even though the existing Torch build was CPU-only. This PR tightens that validation without mutating user environments.Safety
Mismatch detection uses Torch build metadata and only acts on definite mismatches. Existing explicit CPU configurations are left unchanged. Adopted environments are never auto-repaired; users can consent to an in-memory CPU fallback or cancel and create a managed installation.
Validation
pnpm run typecheckpnpm run lintpnpm run buildpnpm run test(191 files, 2,859 tests)pnpm run test:integration(4 files, 28 tests)git diff --check