| library_name: diffusers | |
| pipeline_tag: unconditional-image-generation | |
| tags: | |
| - diffusers | |
| - sit | |
| - image-generation | |
| - class-conditional | |
| inference: true | |
| # SiT-B-2-256-diffusers | |
| Self-contained Diffusers checkpoint repo for SiT. | |
| ## Usage | |
| ```python | |
| import torch | |
| from diffusers import DiffusionPipeline | |
| pipe = DiffusionPipeline.from_pretrained("./").to("cuda" if torch.cuda.is_available() else "cpu") | |
| generator = torch.Generator(device=pipe.device).manual_seed(0) | |
| image = pipe( | |
| class_labels=207, | |
| height=256, | |
| width=256, | |
| num_inference_steps=250, | |
| guidance_scale=4.0, | |
| generator=generator, | |
| ).images[0] | |
| image.save("demo.png") | |
| ``` | |
| ## Components | |
| - `pipeline.py` | |
| - `transformer/transformer_sit.py` | |
| - `scheduler/scheduling_flow_match_sit.py` | |
| - `transformer/diffusion_pytorch_model.safetensors` | |
| - `vae/diffusion_pytorch_model.safetensors` | |