mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: use U2-Net as default model (fast, 2s) with BiRefNet as opt-in
BiRefNet-Lite times out on first load (~60s+ for 973MB model). U2-Net works in 2 seconds. Users can still select BiRefNet for higher quality when they're willing to wait. Added timing hints in model descriptions and increased timeout for BiRefNet models.
This commit is contained in:
@@ -12,12 +12,12 @@ type BgModel =
|
||||
| "u2net";
|
||||
|
||||
const MODELS: { value: BgModel; label: string; description: string }[] = [
|
||||
{ value: "birefnet-general", label: "BiRefNet", description: "Best quality (recommended)" },
|
||||
{ value: "birefnet-general-lite", label: "BiRefNet Lite", description: "Faster, slightly less accurate" },
|
||||
{ value: "birefnet-portrait", label: "BiRefNet Portrait", description: "Optimized for people" },
|
||||
{ value: "bria-rmbg", label: "BRIA RMBG", description: "Great for products" },
|
||||
{ value: "u2net", label: "U2-Net", description: "Fast, good quality (recommended)" },
|
||||
{ value: "isnet-general-use", label: "IS-Net", description: "Good general purpose" },
|
||||
{ value: "u2net", label: "U2-Net", description: "Classic, fast" },
|
||||
{ value: "bria-rmbg", label: "BRIA RMBG", description: "Great for products" },
|
||||
{ value: "birefnet-general-lite", label: "BiRefNet Lite", description: "Higher quality, slower (~15s)" },
|
||||
{ value: "birefnet-portrait", label: "BiRefNet Portrait", description: "Best for people, slower (~15s)" },
|
||||
{ value: "birefnet-general", label: "BiRefNet Full", description: "Best quality, very slow (~60s+)" },
|
||||
];
|
||||
|
||||
const BG_PRESETS = [
|
||||
@@ -34,7 +34,7 @@ export function RemoveBgSettings() {
|
||||
const { processFiles, processing, error, downloadUrl, originalSize, processedSize } =
|
||||
useToolProcessor("remove-background");
|
||||
|
||||
const [model, setModel] = useState<BgModel>("birefnet-general-lite");
|
||||
const [model, setModel] = useState<BgModel>("u2net");
|
||||
const [bgColor, setBgColor] = useState("");
|
||||
const [elapsed, setElapsed] = useState(0);
|
||||
const timerRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user