Replies: 2 comments 4 replies
-
Hey I also facing the same issue with my current version of stable diffusion automatic anyone please suggest solution for this issue |
Beta Was this translation helpful? Give feedback.
1 reply
-
import requests
import io
import base64
from PIL import Image
payload = {
"sampler_name": "DPM++ 2M Karras",
"prompt": "bird",
"steps": 30,
"width": 1024,
"height": 1024,
}
response = requests.post('http://127.0.0.1:7860/sdapi/v1/txt2img', json=payload)
r = response.json()
for i in enumerate(r["images"]):
img = i[1].split(",",1)[0]
image = Image.open(io.BytesIO(base64.b64decode(img)))
image.save(f"output-{i[0]}.png") Everything works fine for me, maybe you disabled something |
Beta Was this translation helpful? Give feedback.
3 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.
-
Hi everyone, I am trying to use the API for txt2img and have followed the instructions written by another user a year ago. However, i noticed on the API docs page that /sdapi/v1/txt2img isn't there anymore - this maybe started around a month ago. I am unsure how to access txt2img via the API when this POST request doesn't exist... can anyone let me know how to access txt2img or even let me know if i am the only one experiencing this in the docs page?
Beta Was this translation helpful? Give feedback.
All reactions