From 772ef65f7bc3b5483d40a5c7b3fc59f072979983 Mon Sep 17 00:00:00 2001 From: Qing Date: Wed, 10 Jan 2024 13:34:51 +0800 Subject: [PATCH] always cpu_textencoder=False if device is not cuda --- iopaint/cli.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iopaint/cli.py b/iopaint/cli.py index 8cd7eb9..cea2715 100644 --- a/iopaint/cli.py +++ b/iopaint/cli.py @@ -106,7 +106,9 @@ def start( file_okay=False, callback=setup_model_dir, ), - low_mem: bool = Option(False, help="Enable attention slicing and vae tiling to save memory."), + low_mem: bool = Option( + False, help="Enable attention slicing and vae tiling to save memory." + ), no_half: bool = Option(False, help=NO_HALF_HELP), cpu_offload: bool = Option(False, help=CPU_OFFLOAD_HELP), disable_nsfw_checker: bool = Option(False, help=DISABLE_NSFW_HELP), @@ -174,7 +176,7 @@ def start( low_mem=low_mem, cpu_offload=cpu_offload, disable_nsfw_checker=disable_nsfw_checker, - cpu_textencoder=cpu_textencoder, + cpu_textencoder=cpu_textencoder if device == Device.cuda else False, device=device, gui=gui, disable_model_switch=disable_model_switch,