Views
No views yet
InfImagine/FiT / InfImagine/FiTv2.Re-distribution notice: weights and configs in this repo are re-packaged from the official InfImagine releases. Original work: FiT (arXiv:2402.12376), FiTv2 (arXiv:2410.13925). License: Apache 2.0.
BiliSakura/FiT-diffusers)diffusers, torch, safetensorsmodel_index.json (includes ImageNet id2label)pipeline.py (FiTPipeline for FiTv1, FiTv2Pipeline for FiTv2)transformer/fit_transformer_2d.py and weightsscheduler/scheduler_config.jsonvae/diffusion_pytorch_model.safetensors (stabilityai/sd-vae-ft-ema)
FiTv1-XL/2 at 256×256, 250 steps, CFG 1.5, seed 42.| Checkpoint | Path | Resolution | Sampler | Steps | CFG | FID (native res) |
|---|---|---|---|---|---|---|
| FiTv1-XL/2 | FiTv1-XL-2-256/ | 256×256 | improved diffusion (DDPM respaced) | 250 | 1.5 | 4.21 |
| FiTv2-XL/2 | FiTv2-XL-2-256/ | 256×256 | flow matching (velocity ODE) | 250 | 1.5 | 2.26 |
| FiTv2-3B/2 | FiTv2-3B-2-256/ | 256×256 | flow matching (velocity ODE) | 250 | 1.5 | 2.15 |
| FiTv2-HR-XL/2 | FiTv2-XL-2-512/ | 512×512 | flow matching (velocity ODE) | 250 | 1.5 | 2.90 |
| FiTv2-HR-3B/2 | FiTv2-3B-2-512/ | 512×512 | flow matching (velocity ODE) | 250 | 1.5 | 2.41 |
1from pathlib import Path
2import torch
3from diffusers import DiffusionPipeline
4
5model_dir = Path("./FiTv2-XL-2-256")
6pipe = DiffusionPipeline.from_pretrained(
7 str(model_dir),
8 local_files_only=True,
9 custom_pipeline=str(model_dir / "pipeline.py"),
10 trust_remote_code=True,
11 torch_dtype=torch.bfloat16,
12).to("cuda")
13
14generator = torch.Generator(device="cuda").manual_seed(42)
15image = pipe(
16 class_labels="golden retriever",
17 height=256,
18 width=256,
19 num_inference_steps=250,
20 guidance_scale=1.5,
21 generator=generator,
22).images[0]
23image.save("demo.png")./FiTv2-XL-2-256), not the repo root. For FiTv1, use ./FiTv1-XL-2-256 with the same call pattern (FiTPipeline + DDPM scheduler).1BiliSakura/FiT-diffusers/
2├── README.md
3├── FiTv1-XL-2-256/
4├── FiTv2-XL-2-256/
5├── FiTv2-3B-2-256/
6├── FiTv2-XL-2-512/
7└── FiTv2-3B-2-512/
8 ├── README.md
9 ├── model_index.json
10 ├── pipeline.py
11 ├── demo.png
12 ├── transformer/
13 │ ├── config.json
14 │ ├── fit_transformer_2d.py
15 │ └── diffusion_pytorch_model.safetensors
16 ├── vae/
17 │ ├── config.json
18 │ └── diffusion_pytorch_model.safetensors
19 └── scheduler/
20 └── scheduler_config.json