mix1009 / sdwebuiapi

Python API client for AUTOMATIC1111/stable-diffusion-webui
MIT License
1.36k stars 183 forks source link

跑demo,默认生成的图片是jpeg,图片生成到哪里去了 #54

Open stvenyin opened 1 year ago

stvenyin commented 1 year ago

use webuiapi.py from webuiapi folder

import webuiapi

api = webuiapi.WebUIApi()

api = webuiapi.WebUIApi(host='127.0.0.1', port=7860, sampler='Euler a', steps=20)

img2txt

result1 = api.txt2img(prompt="cute squirrel", negative_prompt="ugly, out of frame", seed=1003, styles=["anime"], cfg_scale=7,

sampler_index='DDIM',

steps=30,

                )

result1.image

mix1009 commented 1 year ago

I'm not sure what you are asking. Most images from README.md are saved as "jpeg" to reduce size and enhance page load time.

zhuqingsong59 commented 1 year ago

you should do like this:

result1.image.save('test.png')