fix: resolve basicsr/torchvision shim bug, lint warnings, and code formatting

The torchvision compatibility shim for basicsr 1.4.2 was missing the
parent-package binding and only proxied a single attribute, causing
upscale and enhance-faces to fail at import time. The fix adds a
__getattr__ proxy for all attributes, binds the shim to the parent
package, and installs it in the dispatcher at startup for defense-in-depth.

Also removes unused anyInstalling variable, redundant `as any` cast,
and applies Biome formatting fixes across the codebase.
This commit is contained in:
ashim-hq
2026-04-20 17:03:17 +08:00
parent 39e27635c8
commit e7eea34080
9 changed files with 216 additions and 53 deletions
+1 -3
View File
@@ -232,9 +232,7 @@ export const useFeaturesStore = create<FeaturesState>((set, get) => {
// Immediately mark every not-yet-installed bundle as queued so the UI
// updates right away. Exclude bundles that are already installing.
const activeIds = new Set(Object.keys(get().installing));
const pending = get().bundles.filter(
(b) => b.status !== "installed" && !activeIds.has(b.id),
);
const pending = get().bundles.filter((b) => b.status !== "installed" && !activeIds.has(b.id));
// Clear stale errors for these bundles
const errors = { ...get().errors };
for (const b of pending) delete errors[b.id];