continue-revolution / sd-webui-segment-anything

Segment Anything for Stable Diffusion WebUI
3.36k stars 204 forks source link

[Feature]: Can I add auto-cleanup of video memory when using API requests? #208

Open zdoek001 opened 3 months ago

zdoek001 commented 3 months ago

Expected behavior

Because it always takes up 3GB of video memory after calling the api, now I will add auto.py ,204 line

async def api_category_mask(payload: CategoryMaskRequest = Body(...), .... clear_sem_sam_cache() return result

darwindu commented 3 months ago

+1