fix(core-ai): fit video generation in iphone memory
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- ios, react-native, typescript
- Domain
- ai, mobile, performance
Research direction
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.
Written by the indexing model from the issue text.
Description
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-limitentitlement, 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
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 64
- Avg merge
- 11h 8m
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from callstackincubator/ai
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
callstackincubator/ai#378 ·
-
feat(android): add ml kit task apis and context cachingPossibly taken A pull request linked to this issue is open or already merged. Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
callstackincubator/ai#366 · 1 comment ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 20/100
callstackincubator/ai#365 · 2 comments ·
-
Blocked enhancement
Difficulty 3/5 1-2 days Newbie friendliness 30/100
callstackincubator/ai#364 · 1 comment ·
-
feat(android): add streamed and live transcription with word timingsPossibly taken A pull request linked to this issue is open or already merged. OpenBlocked enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
callstackincubator/ai#363 · 1 comment ·
All issues in callstackincubator/ai
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
earendil-works/gondolin#222 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
endora-commerce/endora-commerce#2203 ·
Maintainers usually reply within 1 day
-
enhancement priority:medium ready-for-human
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
wondermoney/wondermoney#1079 ·
Maintainers usually reply within 1 day