Browse Source

face restoration

master
Hendrik Langer 2 years ago
parent
commit
3fd5d31e95
  1. 9
      matrix_pygmalion_bot/ai/runpod_pygmalion.py
  2. 2
      matrix_pygmalion_bot/core.py
  3. 1
      requirements.txt

9
matrix_pygmalion_bot/ai/runpod_pygmalion.py

@ -258,7 +258,14 @@ async def generate_image_automatic(input_prompt: str, negative_prompt: str, api_
input_data = {
"input": {
"prompt": input_prompt,
"steps": 5,
"steps": 20,
"restore_faces": True,
"gfpgan_visibility": 0.5,
"codeformer_visibility": 0.5,
"codeformer_weight": 0.5,
"override_settings": {
"filter_nsfw": False,
},
},
}

2
matrix_pygmalion_bot/core.py

@ -145,7 +145,7 @@ class Callbacks(object):
return
elif event.body.startswith('!image4'):
prompt = event.body.removeprefix('!image4').strip()
negative_prompt = ""
negative_prompt = "ugly, out of frame"
if len(prompt) > 0:
if self.bot.image_prompt:
prompt.replace(self.bot.name, self.bot.image_prompt)

1
requirements.txt

@ -5,3 +5,4 @@ huggingface_hub
python-magic
pillow
argostranslate
webuiapi

Loading…
Cancel
Save