BiliSakura commited on
Commit
46df95c
·
verified ·
1 Parent(s): f81a108

Update all files for BitDance-ImageNet-diffusers

Browse files
Files changed (1) hide show
  1. README.md +106 -0
README.md ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: diffusers
4
+ pipeline_tag: unconditional-image-generation
5
+ base_model: shallowdream204/BitDance-ImageNet
6
+ language:
7
+ - en
8
+ tags:
9
+ - bitdance
10
+ - imagenet
11
+ - class-conditional
12
+ - custom-pipeline
13
+ - diffusers
14
+ ---
15
+
16
+ # BitDance-ImageNet (Diffusers)
17
+
18
+ Diffusers-compatible BitDance ImageNet checkpoints for class-conditional generation at `256x256`.
19
+
20
+ ## Available Subfolders
21
+
22
+ - `BitDance_B_1x` (`parallel_num=1`)
23
+ - `BitDance_B_4x` (`parallel_num=4`)
24
+ - `BitDance_B_16x` (`parallel_num=16`)
25
+ - `BitDance_L_1x` (`parallel_num=1`)
26
+ - `BitDance_H_1x` (`parallel_num=1`)
27
+
28
+ All variants include a custom `BitDanceImageNetPipeline` and support ImageNet class IDs (`0-999`).
29
+
30
+ ## Requirements
31
+
32
+ - `flash-attn` is required for model execution and sampling.
33
+ - Install it in your environment before loading the pipeline.
34
+
35
+ ## Quickstart (native diffusers)
36
+
37
+ ```python
38
+ import torch
39
+ from diffusers import DiffusionPipeline
40
+
41
+ repo_id = "BiliSakura/BitDance-ImageNet-diffusers"
42
+ subfolder = "BitDance_B_1x" # or BitDance_B_4x, BitDance_B_16x, BitDance_L_1x, BitDance_H_1x
43
+
44
+ pipe = DiffusionPipeline.from_pretrained(
45
+ repo_id,
46
+ subfolder=subfolder,
47
+ trust_remote_code=True,
48
+ torch_dtype=torch.float16,
49
+ ).to("cuda")
50
+
51
+ # ImageNet class 207 = golden retriever
52
+ out = pipe(
53
+ class_labels=207,
54
+ num_images_per_label=1,
55
+ sample_steps=100,
56
+ cfg_scale=4.6,
57
+ )
58
+ out.images[0].save("bitdance_imagenet.png")
59
+ ```
60
+
61
+ ## Local Path Note
62
+
63
+ When loading from a local clone, do not point `from_pretrained` to the repo root unless you also provide `subfolder=...`.
64
+ Each variant folder contains its own `model_index.json`, so the most reliable local usage is to load the variant directory directly:
65
+
66
+ ```python
67
+ from diffusers import DiffusionPipeline
68
+
69
+ pipe = DiffusionPipeline.from_pretrained(
70
+ "/path/to/BitDance-ImageNet-diffusers/BitDance_B_1x",
71
+ trust_remote_code=True,
72
+ )
73
+ ```
74
+
75
+ ## Model Metadata
76
+
77
+ - Pipeline class: `BitDanceImageNetPipeline`
78
+ - Diffusers version in configs: `0.36.0`
79
+ - Resolution: `256x256`
80
+ - Number of classes: `1000`
81
+ - Autoencoder class: `BitDanceImageNetAutoencoder`
82
+
83
+ ## Citation
84
+
85
+ If you use this model, please cite BitDance and Diffusers:
86
+
87
+ ```bibtex
88
+ @article{ai2026bitdance,
89
+ title = {BitDance: Scaling Autoregressive Generative Models with Binary Tokens},
90
+ author = {Ai, Yuang and Han, Jiaming and Zhuang, Shaobin and Hu, Xuefeng and Yang, Ziyan and Yang, Zhenheng and Huang, Huaibo and Yue, Xiangyu and Chen, Hao},
91
+ journal = {arXiv preprint arXiv:2602.14041},
92
+ year = {2026}
93
+ }
94
+
95
+ @inproceedings{von-platen-etal-2022-diffusers,
96
+ title = {Diffusers: State-of-the-art diffusion models},
97
+ author = {Patrick von Platen and Suraj Patil and Anton Lozhkov and Damar Jablonski and Hernan Bischof and Thomas Wolf},
98
+ booktitle = {GitHub repository},
99
+ year = {2022},
100
+ url = {https://github.com/huggingface/diffusers}
101
+ }
102
+ ```
103
+
104
+ ## License
105
+
106
+ This repository is distributed under the Apache-2.0 license, consistent with the upstream BitDance release.