Image / video

How much VRAM do image and video generation need?

The model file is in the GPU, but after pressing the create button, a memory error occurs. It's a more frustrating moment because it seems like it's almost over. For images and videos, in addition to the space for storing files, there is a workspace that grows during creation. Let’s start by dividing at what stage it becomes insufficient.

Next to the model body you will also find the necessary components

The text encoder that processes the prompts, the VAE that turns the image into pixels, and the data in between creation use memory. Depending on your workflow, components for images or audio are also added. Whether everything comes up at the same time or in order may also vary.

So, just because the body file is smaller than 12GB, you cannot conclude that a 12GB GPU will achieve the desired resolution. The memory vertices may be different when loading, when sampling, and when unpacking the last image.

Illustration of model weights, text encoder, VAE and workspace being sequentially placed into the graphics memory cabinet.
Image/video models require text encoders, VAEs, and intermediate results in addition to body weights, so matching the VRAM based only on the file size may be insufficient.

It worked at first, but if you increase the resolution,

If you double the width and height respectively, the pixel area quadruples. However, the internal memory and time vary depending on the model's compression, attention, and tile processing, so they are not fixed at exactly four times. This can be understood as a starting point that as the area increases, the workload also increases.

For the same reason, creating a single sheet is different from creating multiple sheets at the same time. If you run out of batches, you can first test them one by one in order. Divide your purpose into whether you want to reduce the total time for multiple chapters or complete one chapter.

Illustration of an offloading bottleneck where the creation process waits due to the narrow transmission path between graphics card memory and system memory.
Offloading allows you to run on less VRAM, but moving data around each step can significantly increase creation time.

Video adds another dimension: time

As the number of frames increases, we need to handle states and relationships at multiple moments. Because the internal computation amount varies depending on the model's time compression method and workflow, the VRAM requirement cannot be determined based on video length alone.

Start with a short length and change the resolution and frame rate one by one. If you raise both at the same time and fail, it's hard to know which to lower. Even after printing is complete, you need to make sure that the format is maintained until the last frame.

Illustration of six memory cabinets of different sizes leading to image drafts, high-quality images, short videos and audio visual work.
The larger the memory capacity, the faster it not only becomes, but also the wider the range of models and outputs that can be run without offloading.

Moving it to RAM gives it room to run.

There is offloading in order to unload components that are used into RAM and onto the GPU when needed. It can allow you to run models on smaller cards, but adds data movement time. Costs also vary depending on whether the entire model moves every step or only some steps.

Not all off-roads slow down by the same factor. Divide the waiting time between loading and creating by looking at the execution log and actual time. Another bottleneck is when disk swapping occurs due to insufficient system RAM.

Before you ask how many GB is the correct answer?

You must first decide on the model to be created, the task, resolution, length, and number of frames. It is not possible to divide all execution ranges based on capacity alone, such as 16GB for images and 24GB for videos. The peak memory of actually identified workflows is a more direct indicator.

If you can complete it on equipment you already have, the next question is whether it's worth the wait. Tasks that you use occasionally may be willing to accept an offload, and tasks that repeat daily may be worth increasing memory to reduce transfers. Rather than upgrading to the highest specs because of a single error, find out where the actual space shortage was first.