mix1009 / sdwebuiapi

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

img2img behaves differently from Automatic1111 #137

Closed aifactory19 closed 9 months ago

aifactory19 commented 9 months ago

Hi,

When calling the img2img function, even with low denoising strength, the image is altered a lot. If I use the same parameters on the UI, image is only altered a little. Is the img2img API not the same as used by Automatic1111? Any parameter I should add/change when calling the API?

On the UI I'm using following parameters:

I'm calling the API with: self.api.img2img(images=[img], prompt=prompt, batch_size = batchsize, negative_prompt=promptnegative, cfg_scale=7, sampler_index=sampler, steps=25, denoising_strength=0.2, width=1536, height=1536)

Thanks in advance.

aifactory19 commented 9 months ago

I actually tried directly with the Automatic1111 REST API and got same result. This based on my prompt, I think parameters are same. One parameter which affect result is "eta", by default at 0 on the A1111 REST API while I believe value is 1 when using UI. But sdwebuiapi already has this parameter set to 1. So all good, closing this issue.