diff --git a/src/lotus/lotusDenoise.ts b/src/lotus/lotusDenoise.ts index d785060e..f48aeef7 100644 --- a/src/lotus/lotusDenoise.ts +++ b/src/lotus/lotusDenoise.ts @@ -39,7 +39,12 @@ import { * malformed value falls back to the bundled "./denoise/". */ function safeAssetBase(raw: string | null): string { - const fallback = "./denoise/"; + // Resolve to an ABSOLUTE same-origin href against the document. Absolute is + // required because native dynamic `import()` (DTLN/DeepFilterNet) resolves a + // relative specifier against the JS chunk's URL, not the document — so a + // relative "./denoise/" would 404. addModule()/fetch() work with absolute + // too, so this keeps all three asset-load paths consistent. + const fallback = new URL("./denoise/", window.location.href).href; if (!raw) return fallback; try { const u = new URL(raw, window.location.href);