Skip to content

The open-source AI voice studio. Clone, dictate, create.

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

jamiepine4a03cd7e778f
diff --git a/backend/backends/base.py b/backend/backends/base.py
index fa1c90ac..83acf2c3 100644
--- a/backend/backends/base.py
+++ b/backend/backends/base.py
@@ -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":