fix(backend): log when VOICEBOX_FORCE_CPU forces the CPU device

Without a trace the Settings GPU label and /health keep reporting CUDA
while generation runs on CPU, so the user has no way to confirm the
override engaged.
This commit is contained in:
jamiepine
2026-10-04 00:00:03 +00:00
committed by capy-ai-staging[bot]
parent 8b8c1429db
commit 4a03cd7e77
+1
View File
@@ -108,6 +108,7 @@ def get_torch_device(
# Stripped: on Windows, where this override matters most, it is usually set
# through the GUI environment editor.
if os.environ.get(FORCE_CPU_ENV_VAR, "").strip() == FORCE_CPU_ENABLED_VALUE:
logger.info("%s=%s set, forcing CPU device", FORCE_CPU_ENV_VAR, FORCE_CPU_ENABLED_VALUE)
return "cpu"
if force_cpu_on_mac and platform.system() == "Darwin":