Skip to content

A SwiftUI-based iOS 26 app featuring a fully local image creator powered by Apple’s Image Playground Models. Private, fast, and cloud-free.

License

Notifications You must be signed in to change notification settings

timokoethe/Localframe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Localframe for iOS

License: MIT Framework Platform Apple

Localframe is a simple SwiftUI image generation app for iOS 26, powered entirely by Apple’s on-device Foundation Models via Image Playground. Designed for demonstration purposes, Localframe enables fast, private, and completely offline image creation — no internet connection or server required.

Localframe showcases how to integrate Apple’s Image Playground framework into a native iOS experience using SwiftUI and the new Foundation Models tools.

⚠️ Disclaimer: This app is for demonstration purposes only and is not production-ready. Output generated by the local image generation model may be inaccurate, incomplete, or misleading.

✨ Features

  • 🖼️ On-device Image Generation: Uses Apple’s local Image Playground framework.
  • 🔐 Privacy-first: All prompts and generated images stay on your device. No data is sent to the cloud.
  • Fast & Offline: Images are generated locally with no need for internet access.
  • 🧑‍🎨 Minimalist Prompt UI: Clean SwiftUI interface for crafting prompts and viewing output.
  • 🗑️ No storage: Generated images are not saved after closing the app.

🛠 Manual

  • Import the Library: To work with Foundation Models, you must import the library in every file where you intend to use them. Go with:

    import ImagePlayground
  • Create an ImageCreator object: To start image creation, you need to create an ImageCreator object. In case of failure you will get an ImageCreator.Error:

    do {
        try await self.imageCreator = ImageCreator()
    } catch {
        self.creatorError = error as? ImageCreator.Error
    }
  • Generate an Image: To create images with the model, simply call the method and pass in your text prompt (as a String) along with the desired style (as ImagePlaygroundStyle).

    let images = imageCreator!.images(
        for: [.text(self.prompt)],
        style: self.generationStyle,
        limit: 2)
  • Save Images: To display the generated images, store them in an array:

    for try await image in images {
        if let generatedImages = generatedImages {
            self.generatedImages = generatedImages + [image.cgImage]
        } else {
            self.generatedImages = [image.cgImage]
        }
    }

About

A SwiftUI-based iOS 26 app featuring a fully local image creator powered by Apple’s Image Playground Models. Private, fast, and cloud-free.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages