Skip to content

Commit

Permalink
Strip comments from hires fix prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
missionfloyd authored Mar 15, 2024
1 parent bef51ae commit 3e2f2a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/processing_scripts/comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ def process(self, p, *args):

p.main_prompt = strip_comments(p.main_prompt)
p.main_negative_prompt = strip_comments(p.main_negative_prompt)

if getattr(p, 'enable_hr', False):
p.all_hr_prompts = [strip_comments(x) for x in p.all_hr_prompts]
p.all_hr_negative_prompts = [strip_comments(x) for x in p.all_hr_negative_prompts]

p.hr_prompt = strip_comments(p.hr_prompt)
p.hr_negative_prompt = strip_comments(p.hr_negative_prompt)


def before_token_counter(params: script_callbacks.BeforeTokenCounterParams):
Expand Down

0 comments on commit 3e2f2a8

Please sign in to comment.