From 6588d76904c53cfd451023102e3943b60c13772e Mon Sep 17 00:00:00 2001 From: a-cid <136735653+a-cidm@users.noreply.github.com> Date: Sat, 8 Mar 2025 22:26:36 -0300 Subject: [PATCH] Fix UnicodeDecodeError by enforcing UTF-8 encoding for config_file --- ui_trt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui_trt.py b/ui_trt.py index 6075084..68ac79e 100644 --- a/ui_trt.py +++ b/ui_trt.py @@ -266,7 +266,7 @@ def get_lora_checkpoints(): base_model = metadata.get("ss_sd_model_name", "Unknown") if os.path.exists(config_file): - with open(config_file, "r") as f: + with open(config_file, "r", encoding="utf-8") as f: config = json.load(f) try: version = SDVersion.from_str(config["sd version"])