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:
@@ -87,7 +87,12 @@ export function getTestImagePath(): string {
|
||||
ihdr[9] = 6; // RGBA
|
||||
fs.writeFileSync(
|
||||
_testImagePath,
|
||||
Buffer.concat([sig, chunk("IHDR", ihdr), chunk("IDAT", deflated), chunk("IEND", Buffer.alloc(0))]),
|
||||
Buffer.concat([
|
||||
sig,
|
||||
chunk("IHDR", ihdr),
|
||||
chunk("IDAT", deflated),
|
||||
chunk("IEND", Buffer.alloc(0)),
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user