web: EXPORT offers a size, and a bigger one is upscaled in the browser
The server still never sees a photo, so the model has to run in the page. Real-ESRGAN x4v3 ships as a 4.9MB ONNX in public/models and is loaded lazily on the first export that actually needs it; the wasm runtime is copied next to CanvasKit at build time and stays lazily fetched, cached for 30 days. Vite is told onnxruntime-web is external-wasm so no 28MB asset lands in the bundle. UNCHANGED keeps the old path and the tier cap; 2K/4K/custom upscale only when the request is larger than the photo being edited, otherwise they resize down. Guests keep UNCHANGED and 2K. Tiling is 256px with an 8px overlap, so memory follows the target size rather than four times it.
This commit is contained in:
@@ -480,6 +480,14 @@ input[type="range"] { width: 100%; accent-color: var(--accent); }
|
||||
gap: 10px;
|
||||
}
|
||||
.modal h2 { margin: 0; font-size: 17px; }
|
||||
/* The one row in the export menu that is not a plain button: a number to type
|
||||
and the button that takes it. */
|
||||
.export-custom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.export-custom .field { width: 96px; }
|
||||
|
||||
/* --- strip moderation (/admin) ------------------------------------------ */
|
||||
.adm { height: 100%; overflow-y: auto; padding: 0 22px 40px; }
|
||||
|
||||
Reference in New Issue
Block a user