From 3cd31d0e24ef939e08ece7c78d53ebe0f7e0bdbb Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 30 Jul 2023 17:18:24 -0400 Subject: [PATCH] Lower CPU thread check for running the text encoder on the CPU vs GPU. --- comfy/model_management.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/model_management.py b/comfy/model_management.py index 24170692..75f3b38a 100644 --- a/comfy/model_management.py +++ b/comfy/model_management.py @@ -364,7 +364,7 @@ def text_encoder_device(): if args.gpu_only: return get_torch_device() elif vram_state == VRAMState.HIGH_VRAM or vram_state == VRAMState.NORMAL_VRAM: - if torch.get_num_threads() < 8: #leaving the text encoder on the CPU is faster than shifting it if the CPU is fast enough. + if torch.get_num_threads() < 4: #leaving the text encoder on the CPU is faster than shifting it if the CPU is fast enough. return get_torch_device() else: return torch.device("cpu")