I have an RTX 3080 with 10GB of VRAM. LTX-2.5 has 22 billion parameters, 39 GB of transformer weights and another 24.5 GB of text encoder. Based on these numbers, the acquaintance could be completed. But the model was launched locally under Windows and integrated into the short video pipeline.

Along the way, I had to deal with loading scales, freeing memory, and one unpleasant safetensors error. And then it turned out that most of the time the computer is generally busy preparing the model: denoising itself takes less than 10% of the time. I'll tell you how it works and what you have to pay for when video memory is low.

What are we launching?

My task is quite practical: to assemble a vertical video from 6–8 plans. To do this, several models work in turn on one computer. Gemma helps with the script via llama.cpp, FLUX.2 [klein] takes shots with the hero's constant face, LTX-2.5 animates them. Next comes the voice through Qwen3-TTS, music through ACE-Step and editing in ffmpeg.

In this article I will focus on LTX. She gets a finished picture, which needs to be turned into a short video plan. It would seem like just one step in a long chain - but this is where we had to tinker with the memory.

I use the distilled version of LTX-2.5. The video is produced in two stages: first, the model works in low resolution, then the result is enlarged and refined. Step by step it looks like this:

  • 8 steps of low resolution denoising (~1.4 s per step),

  • latent upscaler ×2,

  • 3 steps at full resolution 576×1024 (~5 s per step).

Step times here are approximate: these are preliminary observations and not a stand-alone, reproducible benchmark.

How 39 GB fits into 10 GB

The entire model, of course, does not fit into video memory. Therefore, we have to reduce the volume of weights on the GPU and feed them there in parts. To do this, there are two keys in the standard pipeline from the Lightricks/LTX-2 repository: --quantization fp8-cast and --offload cpu. My startup looks like this:

python -m ltx_pipelines.distilled \
  --transformer-path ltx-2.5-22b-distilled-transformer-bf16.safetensors \
  --text-encoder-path gemma4-12b-with-proj-ltx-2.5-bf16.safetensors \
  --spatial-upsampler-path ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors \
  --quantization fp8-cast --offload cpu \
  --width 576 --height 1024 --num-frames 121 --frame-rate 24 \
  --image first_frame.png 0 1.0 --prompt "..."
  • --quantization fp8-cast - weights are stored in bf16, and when loaded on the GPU they are reduced to fp8. Half the memory, no need for a separate fp8 checkpoint.

  • --offload cpu - the transformer is assembled in “streaming” mode: the blocks are in RAM and fed to the video card one by one, as they are counted.

  • PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True - without this, I caught OOM on long plans due to fragmentation.

At the same time, memory does not disappear from the equation: the load moves from the video card to regular RAM. For such a scheme, you need at least 32 GB of RAM, preferably 64, and a swap file of 32 GB. So the words “runs on 10 GB” alone are not enough to describe the requirements.

Rake 1: safetensors crashes on files larger than 2 GB under Windows

The first launch didn’t even get to the point of generation: it ended with an access violation when opening the scales. There was no clear message about what exactly I didn’t like.

In my environment, the problem turned out to be reading large safetensors under Windows. On files larger than about 2 GB, the library tried to display the entire storage and crashed. That is, we first had to figure out how to read the model from disk.

I got around this by substituting safe_open: instead of regular reading, read-only np.memmap is used. We parse the file header ourselves, and provide the tensors as representations on top of the displayed file. This allows you to avoid spending commit memory on a separate copy of the scales. We leave the interface the same, so nothing changes for the LTX pipeline itself.

Below is the basis of this substitution. This is a snippet to explain the idea, not a complete finished patch:

class safe_open:  # повторяет имя оригинала
    def __init__(self, filename, framework="pt", device="cpu", **_):
        with open(filename, "rb") as fh:
            n = struct.unpack("<Q", fh.read(8))[0]
            hdr = json.loads(fh.read(n))
        self._meta = hdr.pop("__metadata__", None)
        self._hdr, self._base = hdr, 8 + n
        self._mm = np.memmap(filename, dtype=np.uint8, mode="r")
    # keys(), metadata(), get_tensor(), get_slice() — поверх self._mm

Connects without editing someone else's code: the file is placed in the site-packages of the environment, and the .pth file with import ltx_sft_patch replaces the module when the interpreter starts.

Rake 2: “unload the model” does not mean freeing up memory

When LTX started working on its own, all that was left was to make it fit in with the other models. There is only one video card, but there are several people willing to occupy its memory.

At first, each model lived in a constant worker process: when it finished working, we called unload and passed the map to the next one. But in my scheme with CPU-offload, after such an unload, part of the video memory and assigned RAM remained busy. The next model no longer fit, although the previous one seemed to have been unloaded.

In the end, the most reliable option turned out to be to complete the entire process. Each model works in its own process and its own venv, and after its step the process closes:

def release(self):
    """Освободить видеопамять под следующую модель: процесс завершается целиком."""
    if self.proc is not None and self.proc.poll() is None:
        try:
            self.proc.stdin.close()
            self.proc.wait(timeout=20)
        except Exception:
            self.proc.kill()
    self.proc = None

In LTX, a separate process is launched for each plan. This solved the issue of freeing up memory, but added some waiting - more on that later. And separate venvs were also useful because the models needed incompatible versions of torch and diffusers. In their surroundings, at least they do not interfere with each other.

Where does time go

This is where the price of constant restarts was revealed. According to preliminary observations, one plan takes about five minutes. Of these, denoising itself is approximately 25 seconds.

Most of the time we have to wait to read and prepare approximately 65 GB of scales: the transformer and the Gemma encoder. And so on for each subsequent plan. When you look only at the total time, it's easy to think that the video card is simply slow at generating video. But by these measures, the main wait is in preparation.

What follows from this:

  • the bottleneck is the disk and RAM, not the GPU. so it's worth measuring your scales loading speed and memory usage first before buying a faster graphics card;

  • video of 6 shots - about half an hour, short - a few minutes;

  • the next optimization step is to keep the encoder and transformer in memory between plans, rather than restarting the process. This option remains to be tested.

How to work around model weaknesses

After all the adventures with memory, one more task remains: to get a movement that can be left in the video. A few simple tricks help me here.

The start frame must show the state before the action . If the door is already open, and in the prompt we ask it to be opened, the model has to figure out what should happen next. It is better to give her a frame from which the desired movement is still possible.

It's more difficult with hands. Contact with an object may cause your fingers to pass through the handle. It’s more convenient to split this action into two plans: in the first, the hand is reaching, then gluing, and in the next, the door is already open. The most problematic moment simply remains behind the scenes.

If it is important how the movement ends, the ending frame can be transferred as a second --image to the last frame. Then the model has both a beginning and a point to which it needs to arrive.

For lipsync there is a separate scheme: a complete, non-distilled model, a distilled-LoRA and an audio branch a2vid_two_stage. From the result I take only the video, and leave the sound from the voiceover.

Bottom line

As a result, LTX-2.5 works on my RTX 3080 and participates in the assembly of videos. Everything is local, without the cloud and subscriptions. True, for a small amount of video memory you have to pay in RAM, loading time and fiddling with the environment.

For short videos you can already work with this. The next challenge is to reduce the reloading of weights between plans. In the meantime, the main practical result is this: the 22B model on a home card with 10 GB turned out to be a completely working option, with its limitations.

Example video: https://youtube.com/shorts/-jz5AJhnWxE I wrote in detail about directing inside the conveyor on DTF: https://dtf.ru/gamedev/5381388-kak-sozdat-video-s-pomoshchyu-rtx-3080-i-ltx-2-5 Portfolio: https://arybashov.github.io · channel: https://t.me/cg_pipeline_lab