mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-04 09:35:16 -07:00
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:
committed by
capy-ai-staging[bot]
parent
8b8c1429db
commit
4a03cd7e77
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user