File size: 2,472 Bytes
12c5704
 
 
 
26c5e04
12c5704
 
 
b6fa971
2ba72de
 
 
 
3926e61
b6fa971
 
 
 
 
 
bd98a2e
b6fa971
 
 
 
c1d1c3b
 
 
 
 
 
 
b6fa971
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3be07c2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
base_model:
- PrunaAI/PrunaVAED
library_name: diffusers
license: other
tags:
- modular_diffusers
- vae
- ltx2.3
- text-to-video
- lightricks
- video-to-video
- text-to-audio
pipeline_tag: text-to-video
---

---

# Pruna VAE for Modular Diffusers

This repository provides a **[Modular Diffusers](https://huggingface.co/docs/diffusers/modular_diffusers/pipeline_block)** implementation of [PrunaVAED](https://huggingface.co/PrunaAI/PrunaVAED). It packages the optimized video decoder implementation together with the custom loading mechanism required to use 
the model as a reusable Modular Diffusers component.

The repository exposes a custom `LoadPrunaVAE` block that downloads and instantiates `PrunaAutoencoderKLLTX2Video`, making it available as `components.vae` within a Modular Diffusers pipeline.

## Installation

Be sure to install pruna, accelerate and diffusers before trying out the model, you can do so with:

```
pip install pruna accelerate diffusers
```
## Features

* Custom `PrunaAutoencoderKLLTX2Video` implementation
* Compatible with `trust_remote_code=True`
* Self-contained repository containing both the implementation and model weights
* Intended for composition inside Modular Diffusers pipelines

## Intended Use

This repository is designed to be consumed by Modular Diffusers pipelines and reusable pipeline blocks. It is particularly useful for:

* Video inference
* Modular Diffusers experimentation
* Custom video generation pipelines
* Research on pruned video VAEs

## Usage

```python
from diffusers.modular_pipelines import ModularPipelineBlocks

blocks = ModularPipelineBlocks.from_pretrained(
    "AINovice2005/pruna-vaed-modular-diffusers",
    trust_remote_code=True,
)

pipeline = blocks.init_pipeline()
pipeline.load_components()

vae = pipeline.vae
```

The loaded component is an instance of:

```python
PrunaAutoencoderKLLTX2Video
```
and can be used anywhere a compatible LTX-2 Video VAE is expected.


> [!WARNING]
> The VAE decoder reconstructs frames from compressed latent representations.
> Depending on the downstream workflow, applying a dedicated image or video upscaler after decoding can noticeably improve perceived sharpness and fine detail, particularly for outputs intended for display at higher resolutions.


## Acknowledgements

This work builds upon the Pruna VAE implementation released by **[PrunaAI](https://github.com/PrunaAI/pruna)** and adapts it for use as a reusable Modular Diffusers component.