mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg.git
synced 2026-11-04 23:27:26 +00:00
[GH-ISSUE #20] What is the API for sd webui? #15
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AUTOMATIC1111/stable-diffusion-webui-rembg#15
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zhuchenye on GitHub (May 23, 2023).
Original GitHub issue: https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg/issues/20
I want to use the API on webui server with the payload as :
payload = {
"image": encode_pil_to_base64(image),
"model": "u2net",
"return_mask": False,
"alpha_matting": False,
"alpha_matting_foreground_threshold": 240,
"alpha_matting_background_threshold": 10,
"alpha_matting_erode_size": 10,
}
but it dos not work.
Is there any docs for remby API?
@Theroniya commented on GitHub (May 23, 2023):
Me too. As a workaround I installed rembg standalone. But why load and wait every time when it is already loaded on the sd server anyway?
@zhuchenye commented on GitHub (May 24, 2023):
I found there is no API route for rembg. So if I used extra_single_image interface, the rembg params will be none.
@hubcart commented on GitHub (May 25, 2023):
It used to work up until a couple weeks ago. I think an update on the webui side broke it.
I still have it working on our older setups but any new setups are broke. when working, you have to put postprocessing_rembg_ before each parameter (see pic)
That setup 100% was working up until about a week or two ago, so if anyone wants to play with that to see what you can find, please post back here if you solve it.
@ccfco commented on GitHub (Jun 2, 2023):
One alternative approach is to create a new file called
api.pyin the scripts folder of the plugin.