fix(core-ai): fit video generation in iphone memory

Aperta
#306 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
ios, react-native, typescript
Ambito
ai, mobile, performance

Direzione di ricerca

Start with the video generation harness test and the WanPipeline loading behavior mentioned in the issue; reproduce the memory pressure on an iPhone. Compare whether the text encoder remains resident during denoising and investigate the listed export and entitlement options. Done means the video generation harness test passes on an iPhone.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Blocked

coreAI.videoModel(...) runs Wan 2.1 T2V 1.3B bundles, and works on macOS: the iOS export generates 81 frames at 832x480 in about 5 minutes with 2 steps, peaking at 6.9 GB.

On an iPhone 17 Pro (iOS 27) the example app is killed about 3 minutes into generation. The decoder first failed to allocate its Metal heap, and with a decoder exported for 32x32 latent tiles the app is still killed by memory pressure. Apple's recipe traces the transformer for a fixed 60x104 latent (832x480) and the decoder for all 21 latent frames, so there is no smaller export to fall back on.

Options:

  • The com.apple.developer.kernel.increased-memory-limit entitlement, added through the Expo config plugin. The example app's signing profile cannot carry capabilities today, so testing it needs an App ID the team owns, and a Release build
  • A recipe change that traces a smaller latent (for example 480x480) or fewer frames, contributed to apple/coreai-models
  • Loading the text encoder (3.1 GB) only for the prompt and releasing it before denoising, if WanPipeline's lazy loading keeps it resident

Done when the video generation harness test passes on an iPhone.

Follow-up from #237.

🤖 Generated with Claude Code

Lingua principale
TypeScript
Stelle
1.4k
Fork
64
Merge medio
11h 8m
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/ai

Tutte le issue di callstackincubator/ai

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.