Browse Source

more stable diffusion endpoints

master
Hendrik Langer 2 years ago
parent
commit
91d3c8c192
  1. 8
      matrix_pygmalion_bot/ai/runpod_pygmalion.py
  2. 4
      matrix_pygmalion_bot/core.py

8
matrix_pygmalion_bot/ai/runpod_pygmalion.py

@ -250,6 +250,14 @@ async def generate_image5(input_prompt: str, negative_prompt: str, api_key: str,
async def generate_image6(input_prompt: str, negative_prompt: str, api_key: str, typing_fn): async def generate_image6(input_prompt: str, negative_prompt: str, api_key: str, typing_fn):
return await generate_image_automatic(input_prompt, negative_prompt, "https://api.runpod.ai/v1/5j1xzlsyw84vk5/", api_key, typing_fn) return await generate_image_automatic(input_prompt, negative_prompt, "https://api.runpod.ai/v1/5j1xzlsyw84vk5/", api_key, typing_fn)
async def generate_image7(input_prompt: str, negative_prompt: str, api_key: str, typing_fn):
# ChilloutMix
return await generate_image_automatic(input_prompt, negative_prompt, "https://api.runpod.ai/v2/rrjxafqx66osr4/", api_key, typing_fn)
async def generate_image8(input_prompt: str, negative_prompt: str, api_key: str, typing_fn):
return await generate_image_automatic(input_prompt, negative_prompt, "https://api.runpod.ai/v2/vuyifmsasm3ix7/", api_key, typing_fn)
async def serverless_automatic_request(payload, cmd, api_url: str, api_key: str, typing_fn): async def serverless_automatic_request(payload, cmd, api_url: str, api_key: str, typing_fn):
# Set the API endpoint URL # Set the API endpoint URL
endpoint = api_url + "run" endpoint = api_url + "run"

4
matrix_pygmalion_bot/core.py

@ -123,6 +123,10 @@ class Callbacks(object):
output = await ai.generate_image5(prompt, negative_prompt, self.bot.runpod_api_key, typing) output = await ai.generate_image5(prompt, negative_prompt, self.bot.runpod_api_key, typing)
elif num == 6: elif num == 6:
output = await ai.generate_image6(prompt, negative_prompt, self.bot.runpod_api_key, typing) output = await ai.generate_image6(prompt, negative_prompt, self.bot.runpod_api_key, typing)
elif num == 7:
output = await ai.generate_image7(prompt, negative_prompt, self.bot.runpod_api_key, typing)
elif num == 8:
output = await ai.generate_image8(prompt, negative_prompt, self.bot.runpod_api_key, typing)
else: else:
raise ValueError('no image generator with that number') raise ValueError('no image generator with that number')
elif self.bot.service == "stablehorde": elif self.bot.service == "stablehorde":

Loading…
Cancel
Save