WidgetKit and Foundation Models

Can WidgetKit and Live Activities directly leverage Foundation Models, or is the recommended approach to use App Intents and have the model run in the containing app

Answered by Frameworks Engineer in 893369022

Because widget extensions have relatively small memory caps (~30mb), using local AI models may not work well in such an environment. If you want to try using them, be aware of those limitations. Exceeding memory limits often can cause your widget reloads to fail, and cause future reloads to occur at times later than normal.

For large-memory AI models, certainly pre-computing or generating what you need from your application where memory constraints are more generous seems a more plausible model if your app/widget workflow allows for that.

Accepted Answer

Because widget extensions have relatively small memory caps (~30mb), using local AI models may not work well in such an environment. If you want to try using them, be aware of those limitations. Exceeding memory limits often can cause your widget reloads to fail, and cause future reloads to occur at times later than normal.

For large-memory AI models, certainly pre-computing or generating what you need from your application where memory constraints are more generous seems a more plausible model if your app/widget workflow allows for that.

WidgetKit and Foundation Models
 
 
Q