Views
No views yet
pipeline.py, component modules, and weights.BiliSakura/ADM-diffusers)diffusers, torch, huggingface_hubpipeline.py, model_index.json, weights, and component code (unet/, classifier/, scheduler/).| Subfolder | Resolution | Guidance scale | OpenAI sources |
|---|---|---|---|
ADM-G-256/ | 256×256 | 1.0 | 256x256_diffusion.pt + 256x256_classifier.pt |
ADM-G-512/ | 512×512 | 4.0 | 512x512_diffusion.pt + 512x512_classifier.pt |
id2label map directly in its own model_index.json (same style as DiT on the Hub). Runtime label resolution is English-only:pipe.id2label — inspect id → English label correspondencepipe.labels — reverse map (English synonym → id), sorted for browsingpipe.get_label_ids("golden retriever")pipe(class_labels="golden retriever", ...)src/labels/id2label_cn.json for reference.
ADM-G-512, DDIMScheduler, num_inference_steps=50, guidance_scale=4.0, seed=42, class "golden retriever".1from pathlib import Path
2import torch
3from diffusers import DDIMScheduler, DiffusionPipeline
4
5model_dir = Path("./BiliSakura/ADM-diffusers/ADM-G-512")
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)
13pipe = pipe.to("cuda")
14pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config)
15class_id = pipe.get_label_ids("golden retriever")[0]
16generator = torch.Generator(device="cuda").manual_seed(42)
17
18out = pipe(
19 class_labels=class_id,
20 guidance_scale=4.0,
21 num_inference_steps=50,
22 generator=generator,
23).images[0]
24out
251BiliSakura/ADM-diffusers/
2├── README.md
3├── ADM-G-256/
4│ ├── pipeline.py
5│ ├── model_index.json
6│ ├── unet/
7│ ├── classifier/
8│ └── scheduler/
9└── ADM-G-512/
10 ├── pipeline.py
11 ├── model_index.json
12 ├── demo.png
13 ├── unet/
14 ├── classifier/
15 └── scheduler/