R-J/SPI-2M
Viewer • Updated • 2.7k • 86
How to use R-J/StainFuser with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("R-J/StainFuser", dtype=torch.bfloat16, device_map="cuda")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]Repo containing model weights from the paper, Github code can be found here
@misc{jewsbury2024stainfuser,
title={StainFuser: Controlling Diffusion for Faster Neural Style Transfer in Multi-Gigapixel Histology Images},
author={Robert Jewsbury and Ruoyu Wang and Abhir Bhalerao and Nasir Rajpoot and Quoc Dang Vu},
year={2024},
eprint={2403.09302},
archivePrefix={arXiv},
primaryClass={eess.IV}
}