Downloads · 30 days
27
28% of all-time downloads
BiliSakura/Txt2Img-MHN-VQVAE
Txt2Img-MHN-VQVAE is a image-to-image model from BiliSakura. Use it when you need one image transformed into another. It is set up for diffusers. The card lists the license as mit.
VQVAE model for remote sensing image generation, part of the Txt2Img-MHN framework.
Downloads · 30 days
27
28% of all-time downloads
All-time downloads
95
Public
Parameters
1.6M
6.4 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors6.4 MB · 100%
From the Hugging Face model README
VQVAE model for remote sensing image generation, part of the Txt2Img-MHN framework.
AutoencoderKL (diffusers)from diffusers import AutoencoderKL
import torch
# Load model
vae = AutoencoderKL.from_pretrained(
"BiliSakura/Txt2Img-MHN-VQVAE",
ignore_mismatched_sizes=True
)
# Encode image to latent
image = torch.randn(1, 3, 256, 256)
with torch.no_grad():
latent_dist = vae.encode(image).latent_dist
latent = latent_dist.sample() # (1, 512, 32, 32)
# Decode latent to image
with torch.no_grad():
decoded = vae.decode(latent).sample # (1, 3, 256, 256)
Trained on the RSICD remote sensing dataset.
@article{txt2img_mhn,
title={Txt2Img-MHN: Remote Sensing Image Generation from Text Using Modern Hopfield Networks},
author={Xu, Yonghao and Yu, Weikang and Ghamisi, Pedram and Kopp, Michael and Hochreiter, Sepp},
journal={IEEE Trans. Image Process.},
doi={10.1109/TIP.2023.3323799},
year={2023}
}
MIT License - for academic use only.