How MegaPortal Brings Stable Diffusion to iOS: A Hands‑On Guide

MegaPortal is an easy‑to‑use AI model loader for Apple devices that lets users configure visual‑block Snippets for tasks such as face‑filtering, Genshin Impact gacha recommendation, and Stable Diffusion image generation, with step‑by‑step tutorials, system requirements, cache clearing, model downloads, and a call for iOS‑dev help.

ELab Team
ELab Team
ELab Team
How MegaPortal Brings Stable Diffusion to iOS: A Hands‑On Guide

What is MegaPortal?

MegaPortal is an easy‑to‑use AI model loader designed for Apple devices. It offers three key selling points: easy visual‑block configuration, accessibility for both AI experts and non‑technical users, and local‑only processing that protects user privacy.

MegaPortal loading Stable Diffusion models
MegaPortal loading Stable Diffusion models

What is it used for?

MegaPortal treats documents as “Snippets” composed of multiple Blocks. One example Snippet implements a face filter: an input image is first processed by AnimeGANv2 to obtain an anime‑style 512×512 image, then up‑scaled to 2048×2048 with SRGAN.

Relevant model repositories:

https://github.com/bryandlee/animegan2-pytorch

https://github.com/dongheehand/SRGAN-PyTorch

Additional Snippets include a Genshin Impact gacha recommender that uses a Visual Text Recognition Block to extract text from a character‑list screenshot, followed by a Javascript Execution Block for text fitting, recommendation, and form display. Another Snippet demonstrates text‑to‑image generation with Stable Diffusion, where a Javascript Execution Block presents a form and passes the input to a second Block that loads a ≥2 GB SD model.

Users can discover more Snippets in the Snippet Center, create their own, and share them via file export or iCloud.

How to use it

System Requirement

To use all features (especially Stable Diffusion), upgrade the device to at least iOS/iPadOS 16.2 or macOS 13.1.

Download

Visit https://www.getmegaportal.com/ to download the latest iOS and macOS versions.

Configure an AI image generation Snippet

The following describes configuring a Stable Diffusion Snippet on macOS.

Open MegaPortal, click “New Document”, and create an empty file.

Download a Stable Diffusion Snippet template and open it.

The app will automatically start downloading the bundled SD model; this may take time. If the network is slow, close the app and download the model manually (see “Model Download” section).

After the model is downloaded, configure the AI Model Application Block, then click “Save”. If a download is still in progress, fully close MegaPortal to stop it.

Reopen the file and click the “Play” button to run the Snippet.

Right‑click the generated image to save it to the Photos app.

Clear Cache

Click the “More” button.

Select “Configuration”.

Open “Local Caches”.

Click “Delete All” or long‑press/right‑click individual entries to delete them.

Source of Inspiration

The project was inspired by three factors: (1) studying SwiftUI in Stanford’s CS193P course and learning about WKWebView and JavascriptCore; (2) experience with an aPaaS project that informed the design of a domain‑specific efficiency tool; (3) the desire to simplify Genshin Impact character‑strength calculations using OCR and AI on iOS.

Current Progress and Future Features

Stable Diffusion support has just been added. Future plans include adding image‑to‑image functionality.

Seeking Help

The primary goal of this post is to obtain assistance with stabilizing the Stable Diffusion feature on iPhone, as many converted models crash on the device. MegaPortal is intended for development on macOS with Snippets synced to iPhone via iCloud, so ensuring model compatibility on iPhone is crucial.

Because the author’s time is limited, they request help from developers experienced with iOS, PyTorch, and Stable Diffusion.

Model files for debugging:

Crashing models:

https://model.getmegaportal.com/classicAnim-v1-einsum_compiled.zip

https://huggingface.co/nitrosocke/classic-anim-diffusion/blob/main/classicAnim-v1.ckpt

Non‑crashing model:

https://model.getmegaportal.com/coreml-stable-diffusion-2-1-base_split_einsum_compiled.zip

Model Download

CoreML‑format Stable Diffusion models converted from open‑source projects are available for download.

Most models omit the Safety Checker to save space; please avoid generating NSFW content. Model sizes range from 2 GB to 4 GB; download speeds are reasonable with a VPN.

Various Style Models

Links to download models for Ghibli, Anime, Elden Ring, Classic Disney, Redshift, Spider‑verse, Archer, Arcane, and the original Stable Diffusion 2‑1 (tested on iPhone 14 Pro Max) are provided throughout the article.

Thanks!

Appreciation is given to ChatGPT, GitHub Copilot, and the open‑source AI community.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

iOSOCRStable DiffusionSwiftUIAI Model LoaderMegaPortal@snippet
ELab Team
Written by

ELab Team

Sharing fresh technical insights

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.