From fa3fdeb53c41fc6664364fefbf133c0d145760c9 Mon Sep 17 00:00:00 2001 From: lvmin Date: Sun, 10 Sep 2023 11:08:12 -0700 Subject: [PATCH] safer str --- modules/expansion.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/expansion.py b/modules/expansion.py index c546c3cf..d3b6f154 100644 --- a/modules/expansion.py +++ b/modules/expansion.py @@ -4,6 +4,8 @@ from modules.path import fooocus_expansion_path def safe_str(x): + for _ in range(16): + x = x.replace(' ', ' ') return str(x).rstrip(",. \r\n")