stable-diffusion-webui-forge
stable-diffusion-webui-forge copied to clipboard
Calling the API /sdapi/v1/txt2img for text-to-image
The API call is /sdapi/v1/txt2img, with the following parameters being passed. The returned image seems to have issues, appearing notably coarser compared to images generated through the web interface. For instance, the texture of the hair is particularly noticeable. Could you identify which parameter was input incorrectly? Could you provide a typical set of parameters for this API call?
payload = {
"prompt": prompt,
"negative_prompt": "",
"seed": -1,
"subseed": -1,
"subseed_strength": 0,
"seed_resize_from_h": -1,
"seed_resize_from_w": -1,
"sampler_name": "Euler",
"scheduler": "Simple",
"batch_size": 1,
"n_iter": 1,
"steps": 4,
"cfg_scale": 1,
"distilled_cfg_scale": guidance, # 3.5
"width": width,
"height": height,
"sampler_index": "Euler"
}