Instructions to use REPA-E/e2e-vavae-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use REPA-E/e2e-vavae-hf with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("REPA-E/e2e-vavae-hf", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -53,6 +53,14 @@ This new version provides a **Hugging Face–compatible AutoencoderKL** checkpoi
|
|
| 53 |
|
| 54 |
It offers **plug-and-play compatibility** with diffusion pipelines and can be seamlessly used to build or train new diffusion models.
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
## 📦 Requirements
|
| 57 |
The following packages are required to load and run the REPA-E VAEs with the `diffusers` library:
|
| 58 |
|
|
@@ -62,7 +70,7 @@ pip install torch>=2.3.1
|
|
| 62 |
```
|
| 63 |
|
| 64 |
## 🚀 Example Usage
|
| 65 |
-
Below is a minimal example showing how to load and use the REPA-E end-to-end trained
|
| 66 |
|
| 67 |
```python
|
| 68 |
from io import BytesIO
|
|
|
|
| 53 |
|
| 54 |
It offers **plug-and-play compatibility** with diffusion pipelines and can be seamlessly used to build or train new diffusion models.
|
| 55 |
|
| 56 |
+
## ⚡️ Quickstart
|
| 57 |
+
```python
|
| 58 |
+
from diffusers import AutoencoderKL
|
| 59 |
+
|
| 60 |
+
vae = AutoencoderKL.from_pretrained("REPA-E/e2e-vavae-hf").to("cuda")
|
| 61 |
+
```
|
| 62 |
+
> Use `vae.encode(...)` / `vae.decode(...)` in your pipeline. (A full example is provided below.)
|
| 63 |
+
|
| 64 |
## 📦 Requirements
|
| 65 |
The following packages are required to load and run the REPA-E VAEs with the `diffusers` library:
|
| 66 |
|
|
|
|
| 70 |
```
|
| 71 |
|
| 72 |
## 🚀 Example Usage
|
| 73 |
+
Below is a minimal example showing how to load and use the REPA-E end-to-end trained VA-VAE with `diffusers`:
|
| 74 |
|
| 75 |
```python
|
| 76 |
from io import BytesIO
|