Skip to content

Commit 9155d94

Browse files
authored
feat: match anything in array syntax, not only words and whitespace (lllyasviel#2438)
allows e.g. [[ (red:1.1), (blue:1.2) ]] and enables same seed checks for different prompt weight
1 parent e54fb54 commit 9155d94

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

modules/sdxl_styles.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,8 @@ def get_words(arrays, totalMult, index):
9494
return [word] + get_words(arrays[1:], math.floor(totalMult/len(words)), index)
9595

9696

97-
9897
def apply_arrays(text, index):
99-
arrays = re.findall(r'\[\[([\s,\w-]+)\]\]', text)
98+
arrays = re.findall(r'\[\[(.*?)\]\]', text)
10099
if len(arrays) == 0:
101100
return text
102101

0 commit comments

Comments
 (0)