When you call CIRAWFilter(imageURL: rawURL, options: [:]) you are calling the old, deprecated CIFilter RAW API. What happens if you just use CIRAWFilter(imageURL: rawURL) (the actual initializer of CIRAWFilter)?
Deferred here means that it's doing the bulk of the work later, but gives you something you can use and show the user quickly. So you can quickly show a preview of the capture (the 12 MP image) and a few seconds later update it with the fully processed 48 MP image.
Since you want to use CIRawFilter, I'm afraid you have to wait for the full image to arrive before you can present the user with editing controls. But you can use the smaller image to bridge the UI transition.
All I did was to set the system & Siri language to English (US) and log in with a US sandbox account under Media & Purchases. Then I could enable Apple Intelligence on my iPad in Germany.
What device did you test on? The trick only works on iPad, not on iPhone and also not on the Simulator (not even in supported countries). It also has to be an iPad that supports Apple Intelligence (M1 or newer).
On iOS, there is a watch dog that kills processes on the GPU that run too long. I don't think there is much you can do to change the timing limit. The only way to prevent that is to improve the runtime of your algorithm. You could also try splitting up the work into multiple steps, if possible. E.g., by splitting up the images into regions and performing the regression on the regions first, and then once more on the results of step one.
Via a private property on MLModelConfiguration: config.setValue(1, forKey: "experimentalMLE5EngineUsage") (1 = disabled, 0 = enabled if possible, 2 = force).
When you call CIRAWFilter(imageURL: rawURL, options: [:]) you are calling the old, deprecated CIFilter RAW API. What happens if you just use CIRAWFilter(imageURL: rawURL) (the actual initializer of CIRAWFilter)?
Deferred here means that it's doing the bulk of the work later, but gives you something you can use and show the user quickly. So you can quickly show a preview of the capture (the 12 MP image) and a few seconds later update it with the fully processed 48 MP image.
Since you want to use CIRawFilter, I'm afraid you have to wait for the full image to arrive before you can present the user with editing controls. But you can use the smaller image to bridge the UI transition.
All I did was to set the system & Siri language to English (US) and log in with a US sandbox account under Media & Purchases. Then I could enable Apple Intelligence on my iPad in Germany.
What device did you test on? The trick only works on iPad, not on iPhone and also not on the Simulator (not even in supported countries). It also has to be an iPad that supports Apple Intelligence (M1 or newer).
On iOS, there is a watch dog that kills processes on the GPU that run too long. I don't think there is much you can do to change the timing limit. The only way to prevent that is to improve the runtime of your algorithm. You could also try splitting up the work into multiple steps, if possible. E.g., by splitting up the images into regions and performing the regression on the regions first, and then once more on the results of step one.
Via a private property on MLModelConfiguration: config.setValue(1, forKey: "experimentalMLE5EngineUsage") (1 = disabled, 0 = enabled if possible, 2 = force).