-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Next: Switch SDXLPromptInvocationBase to read TI names as model keys …
…rather than model_name
- Loading branch information
1 parent
4418c11
commit 33856de
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import re | ||
|
||
from typing import List | ||
|
||
def extract_ti_triggers_from_prompt(prompt: str) -> list[str]: | ||
ti_triggers = [] | ||
|
||
def extract_ti_triggers_from_prompt(prompt: str) -> List[str]: | ||
ti_triggers: List[str] = [] | ||
for trigger in re.findall(r"<[a-zA-Z0-9., _-]+>", prompt): | ||
ti_triggers.append(trigger) | ||
ti_triggers.append(str(trigger)) | ||
return ti_triggers |