|
@ -175,8 +175,8 @@ async def generate_image(input_prompt: str, negative_prompt: str, api_url: str, |
|
|
"negative_prompt": negative_prompt, |
|
|
"negative_prompt": negative_prompt, |
|
|
"width": 512, |
|
|
"width": 512, |
|
|
"height": 512, |
|
|
"height": 512, |
|
|
"nsfw": True |
|
|
# "nsfw": True |
|
|
} |
|
|
}, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
logger.info(f"sending request to runpod.io") |
|
|
logger.info(f"sending request to runpod.io") |
|
@ -230,7 +230,7 @@ async def generate_image2(input_prompt: str, negative_prompt: str, api_key: str) |
|
|
return await generate_image(input_prompt, negative_prompt, "https://api.runpod.ai/v1/sd-openjourney/", api_key) |
|
|
return await generate_image(input_prompt, negative_prompt, "https://api.runpod.ai/v1/sd-openjourney/", api_key) |
|
|
|
|
|
|
|
|
async def generate_image3(input_prompt: str, negative_prompt: str, api_key: str): |
|
|
async def generate_image3(input_prompt: str, negative_prompt: str, api_key: str): |
|
|
return await generate_image(input_prompt, negative_prompt, "https://api.runpod.ai/v1/r9em5b11dkzvo0/", api_key) |
|
|
return await generate_image(input_prompt, negative_prompt, "https://api.runpod.ai/v1/7me2asocq5lr01/", api_key) |
|
|
|
|
|
|
|
|
async def download_image(url, path): |
|
|
async def download_image(url, path): |
|
|
r = requests.get(url, stream=True) |
|
|
r = requests.get(url, stream=True) |
|
|