Skip to content

ComfyUI Base 3.21.0: pick_lane, the cheapest test GPU that holds a measured peak - #41

Merged
Soul-Craft merged 1 commit into
mainfrom
gpu-routing
Oct 17, 2026
Merged

Soul-Craft merged 1 commit into
mainfrom
gpu-routing

Conversation

@Soul-Craft

Copy link
Copy Markdown
Collaborator

What

py/gpu_fit.py learns which free GPU a smoke should go to.

  • LANES, cheapest first: Kaggle T4 (16 GB) and L4 (24 GB), HF ZeroGPU large (48 GB) and xlarge (96 GB), Modal's $30 of monthly credits from a T4 to a B200, then RunPod (RTX PRO 6000, B200, B300), marked paid.
  • pick_lane(peak_gib, minutes, needs) returns the first lane whose card holds the measured peak plus 10 % and whose own limit holds the run:
    • Kaggle: 12 h session
    • ZeroGPU: our 30-minute cap, 15 minutes on xlarge since it costs the quota twice
    • Modal: the minutes $30 buys at the GPU's list price, within Modal's 24 h per call
  • needs takes fast dtypes (fp16 bf16 fp8 fp4, from the compute capability by fast_dtypes()), server (ZeroGPU runs per-call functions, so it never qualifies) and GPU classes (B200, B300). A class is judged by the existing fits(), so GPU_PREFER and pick_lane share one rule.
  • CLI: python3 py/gpu_fit.py --peak-gib 35.7 --minutes 10 --needs bf16 prints lane=zerogpu-large ... paid=no. lane=none exits 1, and an unknown need exits 2.

Modal prices and the 24 h limit come from modal.com/pricing and Modal's timeouts guide (read 2026-10-17). They match ci/modal-smoke/modal_guard.py in the workspace.

Tests

suite/test_unit.py::test_unit_pick_lane_takes_the_cheapest_lane_that_holds_the_peak_and_the_run covers:

  • the lane order and the headroom
  • the ZeroGPU and Modal limits
  • dtypes, server, B200 through fits()
  • the paid fallback, None, and the CLI exit codes

The peaks are the measured ones: Photo Auditor 17.72 GB, Krea 2 bf16 35.7 GB, Flux 2 Dev fp8 about 71 GB.

Nothing ran on the Mac except py_compile, a CLI spot check and package.py --base --check. This PR's CI runs the suite. No pod used.

After merge: tag base-v3.21.0, then the workspace moves the base line of repos.txt in its own commit.

🤖 Generated with Claude Code

…asured peak

`py/gpu_fit.py` gains `LANES` (Kaggle T4 and L4, HF ZeroGPU large and xlarge,
Modal's monthly credits from a T4 to a B200, then paid RunPod), `fast_dtypes(cc)`
and `pick_lane(peak_gib, minutes, needs)`: the first lane whose card holds the
peak plus 10 % and whose own limit holds the run. GPU classes in `needs` are
judged by the existing `fits()`, so there is one GPU_PREFER rule. The CLI takes
`--peak-gib/--minutes/--needs`. Modal's prices and 24 h per-call limit are from
modal.com/pricing and its timeouts guide, read 2026-10-17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Soul-Craft
Soul-Craft requested a review from a team as a code owner October 17, 2026 18:32
@Soul-Craft
Soul-Craft merged commit c6d0cb1 into main Oct 17, 2026
5 checks passed
@Soul-Craft
Soul-Craft deleted the gpu-routing branch October 17, 2026 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant