Default to ML mode#16
Merged
Merged
Conversation
Make ml the default removal mode on both the server (for direct API callers) and the client (the send side always specifies a mode), now that a model is provisioned by default. Matte's audience optimizes for cost/quality over raw speed, and ML produces clean cutouts at acceptable latency. Override with MATTE_DEFAULT_MODE=grabcut. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Default to ML mode
Make
mlthe default removal mode now that every Matte deploy provisions the bundled ISNet model (bg-remover v0.8.0).default_mode→ml(used when a request omitsmode).default_mode→ml(the client always sends an explicit mode from its config, so the server default alone wouldn't reach client-based consumers).ML produces clean, fully-opaque cutouts at acceptable latency — the right default for an audience optimizing for cost/quality over raw speed.
grabcutremains one env var away (MATTE_DEFAULT_MODE=grabcut), and callers can still passmodeper request.Gate
composer readygreen — pint clean, phpstan 0 errors, pest 33/33 (81 assertions), audit clean. matte-server 32 passed / 1 env-skip; matte-client 7 passed. Updated the one HTTP test that submitted without a mode (its expected output key now usesMode::Ml).