Repository navigation
ComfyUI Base 3.21.0
ComfyUI Base 3.21.0: pick_lane, the cheapest test GPU that holds a measured peak (#41)
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) andxlarge(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
xlargesince it costs the
quota twice - Modal: the minutes $30 buys at the GPU's list price, within Modal's 24
h per call needstakes fast dtypes (fp16 bf16 fp8 fp4, from the compute
capability byfast_dtypes()),server(ZeroGPU runs per-call
functions, so it never qualifies) and GPU classes (B200,B300). A
class is judged by the existingfits(), soGPU_PREFERand
pick_laneshare one rule.- CLI:
python3 py/gpu_fit.py --peak-gib 35.7 --minutes 10 --needs bf16
printslane=zerogpu-large ... paid=no.lane=noneexits 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 throughfits() - 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
Co-authored-by: Claude Opus 5.5 noreply@anthropic.com
The zip is what a pod installs. Handbook: comfyui-base-handbook.md