mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg.git
synced 2026-11-04 23:27:26 +00:00
[GH-ISSUE #10] when API mode, always remove background. #9
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#9
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 @scparktop on GitHub (Mar 25, 2023).
Original GitHub issue: https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg/issues/10
when use Upscaler with API mode(ex. /sdapi/v1/extra-single-image), it always remove background.
</scripts/postprocessing_rembg.py >
def process(self, pp: scripts_postprocessing.PostprocessedImage, model, return_mask, alpha_matting, alpha_matting_foreground_threshold, alpha_matting_background_threshold, alpha_matting_erode_size):
if model == "None":
return
input model value is None (no quotation marks)
def process(self, pp: scripts_postprocessing.PostprocessedImage, model, return_mask, alpha_matting, alpha_matting_foreground_threshold, alpha_matting_background_threshold, alpha_matting_erode_size):
if (model == "None" or model == 'None' or model == None):
return