Instructions to use jiayangshi/synchrotron_pixel_diffusion with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use jiayangshi/synchrotron_pixel_diffusion with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("jiayangshi/synchrotron_pixel_diffusion", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Pixel Diffusion UNet β Real-world Synchrotron Dataset (DM4CT)
This repository contains the pretrained pixel-space diffusion UNet presented in the paper DM4CT: Benchmarking Diffusion Models for Computed Tomography Reconstruction.
π Project Page: https://dm4ct.github.io/DM4CT/
π Arxiv: https://arxiv.org/abs/2602.18589
π Codebase: https://github.com/DM4CT/DM4CT
π¬ Model Overview
This model learns a prior over CT reconstruction images using a denoising diffusion probabilistic model (DDPM).
It operates directly in pixel space (not latent space).
- Architecture: 2D UNet (Diffusers
UNet2DModel) - Input resolution: 768 Γ 768
- Channels: 1 (grayscale CT slice)
- Training objective: Ξ΅-prediction (standard DDPM formulation)
- Noise schedule: Linear beta schedule
- Training dataset: Real-world Synchrotron Dataset of rocks
- Intensity normalization: Rescaled to (-1, 1)
This model is intended to be combined with data-consistency correction for CT reconstruction.
π Dataset: Real-world Synchrotron Dataset
Source: Zenodo
Preprocessing steps:
- Train/test split
- Rescale reconstructed slices to (-1, 1)
- No geometry information is embedded in the model
The model learns an unconditional image prior over CT slices.
π§ Training Details
- Optimizer: AdamW
- Learning rate: 1e-4
- Hardware: NVIDIA A100 GPU
- Training script: train_pixel.py
π Usage
You can use this model with the diffusers library as follows:
from diffusers import DDPMPipeline
# Load the pipeline
pipeline = DDPMPipeline.from_pretrained("jiayangshi/synchrotron_pixel_diffusion")
# Access the UNet model
model = pipeline.unet
model.eval()
Citation
@inproceedings{
shi2026dmct,
title={{DM}4{CT}: Benchmarking Diffusion Models for Computed Tomography Reconstruction},
author={Shi, Jiayang and Pelt, Dani{\"e}l M and Batenburg, K Joost},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026},
url={https://openreview.net/forum?id=YE5scJekg5}
}
- Downloads last month
- 7