mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Register custom BiRefNet-matting ONNX session in install_feature.py so
rembg.new_session("birefnet-matting") no longer raises ValueError during
on-demand installs. The session was already registered in remove_bg.py
(runtime) and download_models.py (build-time) but was missed in the
install path, causing background-removal bundle installs to always fail.
Send JSON body on install/uninstall POST requests to avoid Fastify 5's
strict content-type parser rejecting body-less POSTs with 415.
Fix error message extraction to preserve structured {"error": ...} JSON
from the Python script and filter out pthread_setaffinity_np noise.
This commit is contained in:
@@ -191,7 +191,10 @@ export const useFeaturesStore = create<FeaturesState>((set, get) => {
|
||||
});
|
||||
|
||||
try {
|
||||
const result = await apiPost<{ jobId: string }>(`/v1/admin/features/${bundleId}/install`);
|
||||
const result = await apiPost<{ jobId: string }>(
|
||||
`/v1/admin/features/${bundleId}/install`,
|
||||
{},
|
||||
);
|
||||
listenToProgress(bundleId, result.jobId);
|
||||
} catch (err) {
|
||||
const installing = { ...get().installing };
|
||||
@@ -209,7 +212,7 @@ export const useFeaturesStore = create<FeaturesState>((set, get) => {
|
||||
|
||||
uninstallBundle: async (bundleId: string) => {
|
||||
try {
|
||||
await apiPost(`/v1/admin/features/${bundleId}/uninstall`);
|
||||
await apiPost(`/v1/admin/features/${bundleId}/uninstall`, {});
|
||||
await refreshBundles();
|
||||
} catch (err) {
|
||||
set({
|
||||
|
||||
Reference in New Issue
Block a user