Instructions to use RiddleHe/SD14_pathology_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use RiddleHe/SD14_pathology_base with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("RiddleHe/SD14_pathology_base", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Model Card for Model ID
The model is able to generate 512x512 breast cancer pathology images based on generic text prompts, eg. "A histopathology image of breast cancer tissue."
It is the fusion of Stable Diffusion 1.4 and a LORA fine-tuned on 28218 pathology images from the BRCA dataset.
Model Details
Model Description
The model is trained on Stable Diffusion 1.4 with a UNet architecture and a pretrained VAE. It uses a batch size of 16 and lora rank of 32.
How to use
pipe = DiffusionPipeline.from_pretrained(
"RiddleHe/SD14_pathology_base", torch_dtype=torch.float16
)
pipe.to('cuda')
prompt = "A histopathology image of breast cancer tissue"
- Downloads last month
- 4