Spaces:
Running on Zero
Running on Zero
Commit History
-
feat: pad SAM2's returned mask by a few pixels so it comfortably covers the object
nmdbbbSAM2's boundary tends to sit a few pixels inside the object's true edge rather than exactly on it, leaving a visible sliver uncovered (confirmed by the user's own screenshot of the new bordered mask overlay, which made this gap visible for the first time). Padding the mask automatically at the source means the selection the user sees - and that gets sent for removal - already covers the object, rather than relying on them to notice and manually patch small gaps with extra taps or brush strokes.df402fb -
fix: recompute SAM2 embedding inside decode() instead of caching a CUDA tensor across requests
nmdbbbZeroGPU dispatches @spaces.GPU calls to ephemeral worker processes; the host process (no real GPU) can't unpickle a raw CUDA tensor returned from one call and passed into another, causing 'Low-level CUDA init reached' on /segment/point. decode() now re-runs set_image() from the cached PIL image instead of reusing a cross-process embedding.8dc9082 -
Defer SAM2/LaMa construction to first real GPU-decorated call
nmdbbb37fcc27 -
Build SAM2/LaMa on CPU, move to GPU lazily for ZeroGPU compatibility
nmdbbb4bc6028 -
Fix SAM2/LaMa model loading to match real library APIs
nmdbbb523a925 -
Deploy object removal API (SAM2 + LaMa on ZeroGPU)
nmdbbbea2b072