Skip to content

Commit

Permalink
feat: Use [PROMPT] keyword to insert the source prompt (Bing-su#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
Danamir authored Aug 8, 2023
1 parent f18e00b commit 3e80b2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/!adetailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,8 @@ def _get_prompt(
for n in range(len(prompts)):
if not prompts[n]:
prompts[n] = blank_replacement
elif "[PROMPT]" in prompts[n]:
prompts[n] = prompts[n].replace("[PROMPT]", f" {blank_replacement} ")
return prompts

def get_prompt(self, p, args: ADetailerArgs) -> tuple[list[str], list[str]]:
Expand Down

0 comments on commit 3e80b2d

Please sign in to comment.