Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move rembg from AI Horde Bridge to hordelib #47

Closed
db0 opened this issue Apr 8, 2023 · 1 comment
Closed

Move rembg from AI Horde Bridge to hordelib #47

db0 opened this issue Apr 8, 2023 · 1 comment

Comments

@db0
Copy link
Member

db0 commented Apr 8, 2023

Very simple post-processor. Doesn't really belong in the bridge

import rembg

def strip_background(payload):    
    session = rembg.new_session("u2net")
    image = rembg.remove(
        payload["source_image"],
        session=session,
        only_mask=False,
        alpha_matting=10,
        alpha_matting_foreground_threshold=240,
        alpha_matting_background_threshold=10,
        alpha_matting_erode_size=10,
    )
    del session
    return image

Might be worth sending a PR to ComfyUI with it as an official node, but for now this should be OK

@tazlin tazlin transferred this issue from Haidra-Org/hordelib_old Jul 4, 2023
@tazlin
Copy link
Member

tazlin commented Dec 17, 2023

This was resolved for the reGen worker as of #74

@tazlin tazlin closed this as completed Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants