Downloads · 30 days
1
20% of all-time downloads
benetraco/latent_scratch
latent_scratch is a machine learning model from benetraco. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for diffusers.
license: mit tags: - pytorch - diffusers - unconditional-image-generation - diffusion-models-class - medical-imaging - brain-mri - multiple-sclerosis ---
Downloads · 30 days
1
20% of all-time downloads
All-time downloads
5
Public
Parameters
114M
1.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors455 MB · 100%
From the Hugging Face model README
license: mit tags:
This model is a diffusion-based model for unconditional image generation of latent representations of brain MRI FLAIR slices. The model is designed to synthesize high-resolution brain MRI images (256x256 pixels) through a Latent Diffusion process, leveraging a U-Net architecture with ResNet and Attention-based blocks.
1.0e-41.0e-61.0e-8num_train_timesteps: 1000beta_start: 0.0001beta_end: 0.02The model is designed to learn a compressed representation of the brain MRI images at a latent level, making the synthesis process more memory-efficient while maintaining high fidelity.
You can use the model directly with the diffusers library:
from diffusers import LatentDiffusionPipeline
import torch
# Load the model
pipeline = LatentDiffusionPipeline.from_pretrained("benetraco/latent_scratch")
pipeline.to("cuda") # or "cpu"
# Generate an image
image = pipeline(batch_size=1).images[0]
# Display the image
image.show()