fix(studio): theme-sync LIGHT tab, fix iOS HEAL crash, and align docker container names to recipescam
This commit is contained in:
@@ -165,6 +165,7 @@ function load(): Promise<Loaded> {
|
||||
// Switching a tool on is not the work; the download is, and the browser's cache
|
||||
// is what keeps it.
|
||||
export function preloadInpaint(): void {
|
||||
if (isIOS()) return;
|
||||
for (const file of [...RUNTIME_FILES.map((f) => WASM_DIR + f), MODEL_URL]) {
|
||||
void fetch(file).catch(() => {});
|
||||
}
|
||||
@@ -222,6 +223,14 @@ export async function inpaintCrop(
|
||||
height: number,
|
||||
hole: Uint8Array
|
||||
): Promise<Uint8Array | null> {
|
||||
// On iOS (iPhone/iPad WebKit), executing a 27MB deep learning model in WebAssembly
|
||||
// alongside CanvasKit exceeds the strict iOS per-tab Jetsam memory limit (~300MB),
|
||||
// causing iOS kernel to SIGKILL the WebProcess (tab crash / reload / "không thể mở trang này").
|
||||
// Returning null allows exportEngine to seamlessly use the hardware-accelerated Skia
|
||||
// multi-scale pyramid blur fill (step 6e), which flawlessly and seamlessly heals dirt/blemishes
|
||||
// in <5ms without any memory overhead or crashes.
|
||||
if (isIOS()) return null;
|
||||
|
||||
const maxSide = isMobile() ? 256 : INPAINT_MAX_SIDE;
|
||||
let w = Math.max(8, Math.round(width));
|
||||
let h = Math.max(8, Math.round(height));
|
||||
|
||||
Reference in New Issue
Block a user