Views
No views yet
256x256.BitDance_B_1x (parallel_num=1)BitDance_B_4x (parallel_num=4)BitDance_B_16x (parallel_num=16)BitDance_L_1x (parallel_num=1)BitDance_H_1x (parallel_num=1)BitDanceImageNetPipeline and support ImageNet class IDs (0-999).flash-attn is required for model execution and sampling.1import torch
2from diffusers import DiffusionPipeline
3
4repo_id = "BiliSakura/BitDance-ImageNet-diffusers"
5subfolder = "BitDance_B_1x" # or BitDance_B_4x, BitDance_B_16x, BitDance_L_1x, BitDance_H_1x
6
7pipe = DiffusionPipeline.from_pretrained(
8 repo_id,
9 subfolder=subfolder,
10 trust_remote_code=True,
11 torch_dtype=torch.float16,
12).to("cuda")
13
14# ImageNet class 207 = golden retriever
15out = pipe(
16 class_labels=207,
17 num_images_per_label=1,
18 sample_steps=100,
19 cfg_scale=4.6,
20)
21out.images[0].save("bitdance_imagenet.png")from_pretrained to the repo root unless you also provide subfolder=....
Each variant folder contains its own model_index.json, so the most reliable local usage is to load the variant directory directly:1from diffusers import DiffusionPipeline
2
3pipe = DiffusionPipeline.from_pretrained(
4 "/path/to/BitDance-ImageNet-diffusers/BitDance_B_1x",
5 trust_remote_code=True,
6)BitDanceImageNetPipeline0.36.0256x2561000BitDanceImageNetAutoencoder1@article{ai2026bitdance,
2 title = {BitDance: Scaling Autoregressive Generative Models with Binary Tokens},
3 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},
4 journal = {arXiv preprint arXiv:2602.14041},
5 year = {2026}
6}
7
8@inproceedings{von-platen-etal-2022-diffusers,
9 title = {Diffusers: State-of-the-art diffusion models},
10 author = {Patrick von Platen and Suraj Patil and Anton Lozhkov and Damar Jablonski and Hernan Bischof and Thomas Wolf},
11 booktitle = {GitHub repository},
12 year = {2022},
13 url = {https://github.com/huggingface/diffusers}
14}