Diffusers
Safetensors
English
histopathology
he-staining
breast-cancer
diffusion
counterfactuals
explainability
film
conditional-image-generation
Instructions to use a12donhf/CPathOGen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use a12donhf/CPathOGen with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("a12donhf/CPathOGen", 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
File size: 846 Bytes
f6f8194 | 1 2 3 4 5 6 7 8 9 10 11 12 | # Single paper-tile example
Tile: `TCGA-E2-A15D_x46080_y24576_TR`.
- `map.npz`: the original five-channel spatial condition, using the `map` key and shape `(512, 512, 5)`.
- `morphology.json`: 16 already standardized morphology/appearance values, in the checkpoint's feature order.
- `input_map.png`: the paper visualization; use the NPZ, not this RGB preview, for inference.
- `reference_generated.png`: the previously generated paper-package baseline, not a new inference result.
- `metadata.json`: seed, sampling settings, channel order, and condition provenance.
Use seed `1872879198`, `30` steps, and spatial strength `2`. Different hardware or precision can yield different pixels. This example needs neither the full dataset nor a nucleus analyzer. Follow the Colab cell in the model card to generate a new image from these conditions.
|