mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
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:
@@ -91,8 +91,6 @@ export function AiFeaturesSection() {
|
||||
prevInstallingKeys.current = currentKeys;
|
||||
}, [installing, loadDiskUsage]);
|
||||
|
||||
const anyInstalling = Object.keys(installing).length > 0;
|
||||
|
||||
return (
|
||||
<div className="space-y-5">
|
||||
<div className="flex items-center justify-between">
|
||||
@@ -105,9 +103,7 @@ export function AiFeaturesSection() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={installAll}
|
||||
disabled={
|
||||
installAllActive || bundles.every((b) => b.status === "installed")
|
||||
}
|
||||
disabled={installAllActive || bundles.every((b) => b.status === "installed")}
|
||||
className="flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground text-sm font-medium hover:bg-primary/90 transition-colors disabled:opacity-50"
|
||||
>
|
||||
<Download className="h-4 w-4" />
|
||||
|
||||
Reference in New Issue
Block a user