Unconditional Image Generation
Diffusers
Safetensors
English
priming
image-generation
class-conditional
one-step
imagenet
Instructions to use BiliSakura/Priming-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use BiliSakura/Priming-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("BiliSakura/Priming-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "golden retriever" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
|
Download README.md from BiliSakura/Priming-diffusers: direct link, hf CLI and curl.
- Browser
- Download file 3.19 kB
-
https://huggingface.co/BiliSakura/Priming-diffusers/resolve/main/README.md
- Command line
-
hf download hf://BiliSakura/Priming-diffusers/README.md
-
curl -L -o README.md https://huggingface.co/BiliSakura/Priming-diffusers/resolve/main/README.md
3.19 kB
| license: apache-2.0 | |
| library_name: diffusers | |
| pipeline_tag: unconditional-image-generation | |
| tags: | |
| - diffusers | |
| - priming | |
| - image-generation | |
| - class-conditional | |
| - one-step | |
| - imagenet | |
| widget: | |
| - text: golden retriever | |
| output: | |
| url: demo.png | |
| language: | |
| - en | |
| # Priming-diffusers | |
| Native [diffusers](https://github.com/huggingface/diffusers) checkpoints for **Priming** ([Are We Overthinking One-Step Generation?](https://arxiv.org/abs/2610.20331)). Code: [JaeyeonKim01/priming](https://github.com/JaeyeonKim01/priming). Each variant folder is self-contained: | |
| - `pipeline.py` β `PrimingPipeline` | |
| - `scheduler/scheduling_priming.py` β `PrimingScheduler` (one evaluation; the transformer predicts the clean image) | |
| - `transformer/transformer_priming.py` β `PrimingTransformer2DModel` | |
| Load with PyPI `diffusers` and `trust_remote_code=True`. No extra Priming package is required. Sampling is one forward pass in RGB at 256Γ256 with `guidance_scale=1`. Weights are the released post-training EMA. The paper reports ImageNet-256 FID 1.38 for Priming-B and 1.19 for Priming-L. | |
| ## Available checkpoints | |
| | Checkpoint | Path | Resolution | Steps | Guidance | | |
| | --- | --- | --- | ---: | ---: | | |
| | Priming-B | [`Priming-B/`](Priming-B/) | 256Γ256 | 1 | 1.0 | | |
| | Priming-L | [`Priming-L/`](Priming-L/) | 256Γ256 | 1 | 1.0 | | |
| ## Demo | |
|  | |
| Class: *golden retriever* (ImageNet 207) β 256Γ256, 1 step, `guidance_scale=1.0`, `torch_dtype=bfloat16`, seed 1. | |
| ## ImageNet class labels | |
| Each variant keeps an English `id2label` map in `model_index.json`. | |
| - `pipe.id2label` β id β English label | |
| - `pipe.labels` β synonym β id | |
| - `pipe.get_label_ids("golden retriever")` | |
| - `pipe(class_labels="golden retriever", ...)` β string labels resolve automatically | |
| `height` and `width` default to 256. Other sizes divisible by the patch size of 16 interpolate the learned positions and rebuild 2-D rotary frequencies. | |
| ## Inference | |
| ```python | |
| import torch | |
| from diffusers import DiffusionPipeline | |
| pipe = DiffusionPipeline.from_pretrained( | |
| "BiliSakura/Priming-diffusers", | |
| subfolder="Priming-B", # or "Priming-L" | |
| custom_pipeline="pipeline.py", | |
| trust_remote_code=True, | |
| torch_dtype=torch.bfloat16, | |
| ).to("cuda") | |
| print(pipe.id2label[207]) | |
| image = pipe( | |
| class_labels="golden retriever", | |
| num_inference_steps=1, | |
| guidance_scale=1.0, | |
| generator=torch.Generator(device="cuda").manual_seed(1), | |
| ).images[0] | |
| image.save("demo.png") | |
| ``` | |
| Local checkout: | |
| ```python | |
| from pathlib import Path | |
| import torch | |
| from diffusers import DiffusionPipeline | |
| model_dir = Path("Priming-diffusers/Priming-B") | |
| pipe = DiffusionPipeline.from_pretrained( | |
| str(model_dir), | |
| local_files_only=True, | |
| custom_pipeline=str(model_dir / "pipeline.py"), | |
| trust_remote_code=True, | |
| torch_dtype=torch.bfloat16, | |
| ).to("cuda") | |
| ``` | |
| ## Citation | |
| ```bibtex | |
| @misc{park2026are, | |
| title = {Are We Overthinking One-Step Generation?}, | |
| author = {Park, Woobin and Kim, Jaeyeon and Du, Yilun and Chen, Sitan and Han, Bohyung}, | |
| year = {2026}, | |
| eprint = {2610.20331}, | |
| archivePrefix = {arXiv}, | |
| primaryClass = {cs.LG}, | |
| url = {https://arxiv.org/abs/2610.20331} | |
| } | |
| ``` | |