mix1009 / sdwebuiapi

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

problem with using adetailer #152

Closed saltedfisssh closed 5 months ago

saltedfisssh commented 6 months ago
adetailer = webuiapi.ADetailer(ad_model='face_yolov8n.pt', ad_denoising_strength=0.6)
res = api.txt2img(
    # enable_hr=enable_hr,
    prompt=prompt,
    negative_prompt=negative_prompt,
    width=width,
    height=height,
    controlnet_units=[ip_adapter, openpose] if use_ip_adapter else [openpose],
    adetailer=[adetailer]
).image

The logic for generating images seems different from webui, leading to strange results. image

davidmartinrius commented 5 months ago

Hi @saltedfisssh , do you mean that using the same seed, cfscale, steps you get a different image when applying adetailer?

saltedfisssh commented 5 months ago

When using adetailer, only the facial part is recognized, but it attempts to generate more parts besides the face. Use the same parameters as webui.

davidmartinrius commented 5 months ago

Please provide the model and the parameters you are using. I won't engage in trial and error to reproduce the problem.

If you provide the exact parameters, I will attempt to replicate it both through the API and the web user interface to investigate what might be happening.

Thank you!

saltedfisssh commented 5 months ago

Sorry, during the process of reproducing, I found out that this is an issue with Adetailer. Thank you for your help!

davidmartinrius commented 5 months ago

Great! Good to know it is not a problem of this api wrapper. Bad to know that Adetailer has this behaviour.. thanks for letting me know!