sdwebuiapi icon indicating copy to clipboard operation
sdwebuiapi copied to clipboard

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

Open stvenyin opened this issue 1 year ago • 2 comments

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

stvenyin avatar Apr 24 '23 02:04 stvenyin

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.

mix1009 avatar Apr 24 '23 08:04 mix1009

you should do like this:

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

zhuqingsong59 avatar Jul 11 '23 08:07 zhuqingsong59