Update README.md
Browse files
README.md
CHANGED
@@ -48,7 +48,7 @@ You can load the pre-trained Emuru VAE using Diffusers’ `AutoencoderKL` interf
|
|
48 |
|
49 |
```python
|
50 |
from diffusers import AutoencoderKL
|
51 |
-
model = AutoencoderKL.from_pretrained("
|
52 |
```
|
53 |
|
54 |
Below is an example code snippet that demonstrates how to load an image directly from a URL, process it, encode it into the latent space, decode it back to image space, and save the reconstructed image.
|
@@ -63,7 +63,7 @@ from huggingface_hub import hf_hub_download
|
|
63 |
from torchvision.transforms.functional import to_tensor, to_pil_image
|
64 |
|
65 |
# Load the pre-trained Emuru VAE from Hugging Face Hub.
|
66 |
-
model = AutoencoderKL.from_pretrained("
|
67 |
|
68 |
# Function to preprocess an RGB image:
|
69 |
# Loads the image, converts it to RGB, and transforms it to a tensor normalized to [0, 1].
|
@@ -80,7 +80,7 @@ def postprocess_tensor(tensor):
|
|
80 |
|
81 |
# Example: Encode and decode an image.
|
82 |
# Replace the following line with your image path.
|
83 |
-
image_path = hf_hub_download(repo_id="
|
84 |
|
85 |
input_image = preprocess_image(image_path)
|
86 |
|
|
|
48 |
|
49 |
```python
|
50 |
from diffusers import AutoencoderKL
|
51 |
+
model = AutoencoderKL.from_pretrained("blowing-up-groundhogs/emuru_vae")
|
52 |
```
|
53 |
|
54 |
Below is an example code snippet that demonstrates how to load an image directly from a URL, process it, encode it into the latent space, decode it back to image space, and save the reconstructed image.
|
|
|
63 |
from torchvision.transforms.functional import to_tensor, to_pil_image
|
64 |
|
65 |
# Load the pre-trained Emuru VAE from Hugging Face Hub.
|
66 |
+
model = AutoencoderKL.from_pretrained("blowing-up-groundhogs/emuru_vae")
|
67 |
|
68 |
# Function to preprocess an RGB image:
|
69 |
# Loads the image, converts it to RGB, and transforms it to a tensor normalized to [0, 1].
|
|
|
80 |
|
81 |
# Example: Encode and decode an image.
|
82 |
# Replace the following line with your image path.
|
83 |
+
image_path = hf_hub_download(repo_id="blowing-up-groundhogs/emuru_vae", filename="samples/lam_sample.jpg")
|
84 |
|
85 |
input_image = preprocess_image(image_path)
|
86 |
|