Replies: 1 comment
-
Something like this, except populate import requests
import base64
prompts = [
#put your prompts here,
]
for n, i in enumerate(prompts):
payload = {
"prompt": i,
}
response = requests.post(url='http://127.0.0.1:7860/sdapi/v1/txt2img', json=payload)
r = response.json()
with open(f"output-{n}.png", "wb") as f:
f.write(base64.b64decode(r["images"][0])) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
so I have a parquet file containing 5000 prompts, how can I create images using these prompts via the api?
Beta Was this translation helpful? Give feedback.
All reactions