Hendrik Langer 2 years ago
parent
commit
7257b2cfa3
  1. 6
      matrix_pygmalion_bot/ai/runpod_pygmalion.py
  2. 4
      matrix_pygmalion_bot/helpers.py

6
matrix_pygmalion_bot/ai/runpod_pygmalion.py

@ -31,7 +31,7 @@ async def generate_sync(
input_data = {
"input": {
"prompt": prompt,
"max_length": max(prompt_num_tokens+max_new_tokens, 2048),
"max_length": min(prompt_num_tokens+max_new_tokens, 2048),
"temperature": 0.80,
"do_sample": True,
}
@ -61,7 +61,7 @@ async def generate_sync(
return reply
elif status == 'IN_PROGRESS' or status == 'IN_QUEUE':
job_id = r_json["id"]
TIMEOUT = 180
TIMEOUT = 360
DELAY = 5
for i in range(TIMEOUT//DELAY):
endpoint = "https://api.runpod.ai/v2/pygmalion-6b/status/" + job_id
@ -191,7 +191,7 @@ async def generate_image(input_prompt: str, negative_prompt: str, api_url: str,
if status != 'IN_QUEUE':
raise ValueError(f"RETURN CODE {status}")
job_id = r_json["id"]
TIMEOUT = 180
TIMEOUT = 360
DELAY = 5
output = None
for i in range(TIMEOUT//DELAY):

4
matrix_pygmalion_bot/helpers.py

@ -5,11 +5,11 @@ logger = logging.getLogger(__name__)
class Event:
def __init__(self, tick_start, tick_stop, chance, repeat, command):
def __init__(self, tick_start, tick_stop, chance, repeat_times, command):
self.tick_start = tick_start
self.tick_stop = tick_stop
self.chance = chance
self.repeat = repeat
self.repeat_times = repeat_times
self.command = command
self.executed = 0
def __str__(self):

Loading…
Cancel
Save