Skip to content

Commit a227226

Browse files
fix: fix regex for macOS/Clang support (leejet#16)
--------- Co-authored-by: leejet <leejet714@gmail.com>
1 parent 17095dd commit a227226

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stable-diffusion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ std::vector<std::pair<std::string, float>> parse_prompt_attention(const std::str
397397
float round_bracket_multiplier = 1.1f;
398398
float square_bracket_multiplier = 1 / 1.1f;
399399

400-
std::regex re_attention(R"(\\\(|\\\)|\\\[|\\]|\\\\|\\|\(|\[|:([+-]?[.\d]+)\)|\)|]|[^\\()\[\]:]+|:)");
400+
std::regex re_attention(R"(\\\(|\\\)|\\\[|\\\]|\\\\|\\|\(|\[|:([+-]?[.\d]+)\)|\)|\]|[^\\()\[\]:]+|:)");
401401
std::regex re_break(R"(\s*\bBREAK\b\s*)");
402402

403403
auto multiply_range = [&](int start_position, float multiplier) {

0 commit comments

Comments
 (0)