How to use from the
Use from the
Diffusers library
# Gated model: Login with a HF token with gated access permission
hf auth login
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("yurman/mri-sd-v21-oasis", dtype=torch.bfloat16, device_map="cuda")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Text-to-image finetuning - yurman/mri-sd-v21-oasis

This pipeline was finetuned from stabilityai/stable-diffusion-2-1 on the OASIS-3 dataset for brain image generation. Below are some example images generated with the finetuned pipeline:

val_imgs_grid

Pipeline usage

You can use the pipeline like so:

from diffusers import DiffusionPipeline
import torch

pipeline = DiffusionPipeline.from_pretrained("yurman/mri-sd-v21-oasis", torch_dtype=torch.float16)
prompt = "An empty, flat black image with a MRI brain axial scan in the center"
image = pipeline(prompt).images[0]
image.save("my_image.png")

Training info

These are the key hyperparameters used during training:

  • Epochs: 25
  • Learning rate: 5e-05
  • embeds rate: 5e-05
  • Batch size: 4
  • Classifier free guidance: 1
  • VAE scaling: Same as in the original model
  • Input perturbation: 0.0
  • Noise offset: 0
  • Gradient accumulation steps: 4
  • Image resolution: 384
  • Mixed-precision: None
  • Max rotation degree: 0.0

More information on all the CLI arguments and the environment are available on your wandb run page.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for yurman/mri-sd-v21-oasis

Finetuned
(179)
this model
Adapters
1 model