Instructions to use BiliSakura/pMF-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use BiliSakura/pMF-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/pMF-diffusers", 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
- Local Apps Settings
- Draw Things
- DiffusionBee
| license: mit | |
| library_name: diffusers | |
| pipeline_tag: text-to-image | |
| tags: | |
| - diffusers | |
| - pmf | |
| - image-generation | |
| - class-conditional | |
| - imagenet | |
| inference: true | |
| # pMF-B-32 | |
| Self-contained Diffusers variant for **pMF-B/32** (Pixel Mean Flows). | |
| Recommended settings: `guidance_scale=6.5`, interval `[0.1, 0.7]`, `noise_scale=2.0`. | |
| ## Load | |
| ```python | |
| from pathlib import Path | |
| from diffusers import DiffusionPipeline | |
| import torch | |
| model_dir = Path("./pMF-B-32") | |
| 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.float32, | |
| ).to("cuda") | |
| image = pipe( | |
| class_labels=207, | |
| num_inference_steps=1, | |
| guidance_scale=6.5, | |
| guidance_interval_min=0.1, | |
| guidance_interval_max=0.7, | |
| noise_scale=2.0, | |
| ).images[0] | |
| ``` | |