Team Ai
Modelpublic

BiliSakura/BitDance-ImageNet-diffusers

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
0likes
README.md107 linesDownload Raw Back to root
1---2license: apache-2.03library_name: diffusers4pipeline_tag: unconditional-image-generation5base_model: shallowdream204/BitDance-ImageNet6language:7  - en8tags:9  - bitdance10  - imagenet11  - class-conditional12  - custom-pipeline13  - diffusers14---15 16# BitDance-ImageNet (Diffusers)17 18Diffusers-compatible BitDance ImageNet checkpoints for class-conditional generation at `256x256`.19 20## Available Subfolders21 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 28All variants include a custom `BitDanceImageNetPipeline` and support ImageNet class IDs (`0-999`).29 30## Requirements31 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```python38import torch39from diffusers import DiffusionPipeline40 41repo_id = "BiliSakura/BitDance-ImageNet-diffusers"42subfolder = "BitDance_B_1x"  # or BitDance_B_4x, BitDance_B_16x, BitDance_L_1x, BitDance_H_1x43 44pipe = 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 retriever52out = pipe(53    class_labels=207,54    num_images_per_label=1,55    sample_steps=100,56    cfg_scale=4.6,57)58out.images[0].save("bitdance_imagenet.png")59```60 61## Local Path Note62 63When loading from a local clone, do not point `from_pretrained` to the repo root unless you also provide `subfolder=...`.64Each variant folder contains its own `model_index.json`, so the most reliable local usage is to load the variant directory directly:65 66```python67from diffusers import DiffusionPipeline68 69pipe = DiffusionPipeline.from_pretrained(70    "/path/to/BitDance-ImageNet-diffusers/BitDance_B_1x",71    trust_remote_code=True,72)73```74 75## Model Metadata76 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## Citation84 85If you use this model, please cite BitDance and Diffusers:86 87```bibtex88@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## License105 106This repository is distributed under the Apache-2.0 license, consistent with the upstream BitDance release.107