-cpu flag
This commit is contained in:
@@ -171,6 +171,18 @@ def _gpu_inventory_profile(gpu: dict | None, ram_mb: int) -> dict | None:
|
||||
return profile
|
||||
|
||||
|
||||
def with_forced_cpu(hw: dict) -> dict:
|
||||
"""Return a hardware profile forced to CPU execution.
|
||||
|
||||
Keeps detected GPU metadata for diagnostics and tracker registration context,
|
||||
but clears CUDA availability so startup and the model backend stay on CPU.
|
||||
"""
|
||||
forced = dict(hw)
|
||||
forced["device"] = "cpu"
|
||||
forced["cuda_available"] = False
|
||||
return forced
|
||||
|
||||
|
||||
def detect_hardware() -> dict:
|
||||
"""Detect GPU model and available VRAM. Returns hardware profile dict."""
|
||||
ram_mb = _detect_ram_mb()
|
||||
|
||||
Reference in New Issue
Block a user