Edit model card

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.

YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Stable Diffusion MIMIC-CXR Model Card

Stable Diffusion is a latent text-to-image diffusion model capable of generating photo-realistic images given any text input. We finetune Stable-Diffusion-v1-4 checkpoint on MIMIC-CXR dataset.

This weights here are intended to be used with the 🧨 Diffusers library. Note: this weight can be only used with x-ray image editing, the performance is not good for generate a new x-ray image.

Our code related to this weight: https://github.com/IrohXu/PIE. Please star it if you like this work.

Cite as:

@article{liang2023pie,
  title={PIE: Simulating Disease Progression via Progressive Image Editing},
  author={Liang, Kaizhao and Cao, Xu and Liao, Kuei-Da and Gao, Tianren and Ye, Wenqian and Chen, Zhengyu and Cao, Jianguo and Nama, Tejas and Sun, Jimeng},
  year={2023}
}

PyTorch

pip install --upgrade diffusers transformers scipy     

Running the pipeline with the default PNDM scheduler:

import torch
from diffusers import StableDiffusionPipeline

model_id = "IrohXu/stable-diffusion-mimic-cxr-v0.1"
device = "cuda"


pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16, safety_checker=None)
pipe = pipe.to(device)

prompt = "Severe edema in the left and right lower lobes, severity. Severe right and left pleural effusion is larger."
image = pipe(prompt).images[0]  
    
image.save("result.png")
Downloads last month
12
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.