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
|
Download examples/paper_tile/README.md from a12donhf/CPathOGen: direct link, hf CLI and curl.
- Browser
- Download file 846 Bytes
-
https://huggingface.co/a12donhf/CPathOGen/resolve/main/examples/paper_tile/README.md
- Command line
-
hf download hf://a12donhf/CPathOGen/examples/paper_tile/README.md
-
curl -L -o README.md https://huggingface.co/a12donhf/CPathOGen/resolve/main/examples/paper_tile/README.md
846 Bytes
| # 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. | |