From db42b365c91d9fc79ebe0a3189a6cf7135357072 Mon Sep 17 00:00:00 2001 From: jllllll <3887729+jllllll@users.noreply.github.com> Date: Fri, 25 Aug 2023 12:37:02 -0500 Subject: [PATCH] Fix ctransformers threads auto-detection (#3688) --- modules/ctransformers_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ctransformers_model.py b/modules/ctransformers_model.py index 8b8b5c4..60b34e7 100644 --- a/modules/ctransformers_model.py +++ b/modules/ctransformers_model.py @@ -15,7 +15,7 @@ class CtransformersModel: config = AutoConfig.from_pretrained( str(path), - threads=shared.args.threads, + threads=shared.args.threads if shared.args.threads != 0 else -1, gpu_layers=shared.args.n_gpu_layers, batch_size=shared.args.n_batch, context_length=shared.args.n_ctx,