Explainers
Why AI Image Models Take Gigabytes of Storage
A diffusion model download can be bigger than a whole video game. Where those gigabytes go: parameters, text encoders, and VAEs, explained in plain language.
By Mohit P · · Updated · 7 min read
AI image models take gigabytes because they are made of billions of learned numbers (parameters), and each one takes storage: a billion parameters at 16-bit is roughly 2 GB. Download a model and the number is startling. Two, three, seven gigabytes for a single file that draws pictures. A big-budget game earns its size with hours of textures, audio, and video. A model is only numbers. Each one is a small dial of a neural network that training spent months turning, and a single model holds billions of them.
The size of an AI model is arithmetic you can do on a napkin. Count the parameters, then multiply by the bytes each one occupies. Once you can do that arithmetic, model download sizes and working memory (RAM) requirements follow. So does the whole point of storing a model in fewer bits, a trick called quantization.
The napkin math: parameters times bytes
A neural network is a gigantic pile of learned numbers called parameters (or weights). Each one holds a tiny scrap of what the model knows. No single parameter means anything on its own. Together they store everything the model learned about how images look. Training sets their values. The file you download is those values, written out to disk.
Each parameter is stored as a number with some precision. Training commonly uses a 16-bit format, which is two bytes per parameter. From there the math is one multiplication. A network with one billion parameters at two bytes each is two billion bytes, or roughly 2 GB. A 3.5-billion-parameter system at 16-bit is about 7 GB. Halve the bytes per parameter and you halve the file. That single lever is most of the size story.
The file usually stores learned weights rather than a library of training image files. That distinction does not rule out memorization or close reproduction of training examples. It explains why parameter count and number precision, rather than the size of the training image archive, determine the downloaded weights.
Three networks in a trench coat
A “model” download is a bundle of separate networks. Each one has its own parameter count.
- The text encoder turns your prompt into numbers the rest of the system understands. Original Stable Diffusion used an encoder of roughly 123 million parameters. SDXL carries two text encoders that together approach a billion parameters. That slice of the download is spent on understanding words.
- The diffusion backbone is the giant of the bundle. It is the network that does the work of clearing noise away, step by step, to reveal a picture. (Clearing the noise is called denoising.) It holds around 860 million parameters in classic Stable Diffusion, and about 2.6 billion in SDXL. Nearly all of the visual knowledge lives here, and so do nearly all of the gigabytes.
- The VAE squeezes images down to the small working canvas the backbone paints on. It then expands the result back into pixels. At under a hundred million parameters it is the cheap part, tens of megabytes.
Sum the parts for SDXL and you land around 3.5 billion parameters. At 16-bit precision that is roughly 7 GB, which matches the downloads you see.
Why bigger tends to be better
Labs keep making models larger because parameters are capacity. Every reliable finding about scale in modern machine learning says the same thing. Given enough training data, more parameters store more visual knowledge: more textures, objects and styles, and more of the subtle statistics that make a hand have five fingers. Small models are forced to drop knowledge, and it shows first in rare subjects, fine anatomy, and text inside images.
The correlation is not a straight line. Architecture, data quality, and training technique matter. One method, called distillation, lets a model of the same size do its work in a tenth of the steps. But no training trick lets one billion parameters hold what ten billion can. Quality wants more parameters and downloads and RAM want fewer. That tension defines the on-device category.
Quantization: the shrink lever
You cannot cheaply remove parameters from a trained model. But you can revisit the other half of the multiplication: bytes per parameter. Store each weight with fewer bits (8 instead of 16, or even 4), the way you might round a ledger to whole dollars. That is quantization. It costs little quality. Networks are highly redundant. Their behavior rests on broad statistical patterns across millions of weights, not on the fifth decimal place of any one of them.
A 16-bit model quantized to 4-bit shrinks by 75 percent. That hypothetical 2 GB billion-parameter network becomes about half a gigabyte. A 7 GB SDXL-class bundle drops to the low single gigabytes. Runtime RAM may also fall, but not by the same ratio: temporary activations, decoding, and any expanded weights still need memory. How the rounding is done without wrecking quality, and where it starts to break, is its own story. See our deep dive on quantization.
What this means on a phone
On a server, model size is a line item. On an iPhone it is two hard walls. Storage is the visible one: a multi-gigabyte download competes with your photo library. Working memory, or RAM, is the unforgiving one. To generate an image, the parameters have to be loaded into that memory. iOS strictly caps what one app may use, and it shuts down apps that cross the line. A desktop can spill the overflow onto disk, but a phone has no such safety net. A 7 GB full-precision model is not loadable on a 6 GB phone at any speed. There, quantization is a requirement.
Where Onhand’s gigabytes go
Onhand’s prepared packages vary by architecture and compression. Turbo is about 2.05 GB, Detailed Images about 2.99 GB, and the 4-bit Detailed Scenes package about 4.62 GB. Core ML style packs are roughly 0.96 GB each. These are decimal download sizes, not the RAM required while generating.
The Models screen shows the available packages. Install only the ones you intend to use, and remove a package when you need the space. A larger package may behave differently, but size alone does not prove sharper output or better prompt following. Those need comparison on the images you make.
How much free storage each pack needs before you go offline is covered on the offline AI image generator for iPhone page.
Sources
Primary sources for the claims above, so you can check them rather than take our word for it.
- Stability AI, SD Turbo model card. Component breakdown and published file sizes.
- Rombach et al., High-Resolution Image Synthesis with Latent Diffusion Models (2022). Describes the text encoder, backbone and decoder that make up the total.