BiliSakura commited on
Commit
fd2ffe0
·
verified ·
1 Parent(s): 7bf6881

Update all files for BitDance-Tokenizer-diffusers

Browse files
Files changed (1) hide show
  1. README.md +83 -0
README.md ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: diffusers
4
+ pipeline_tag: image-to-image
5
+ base_model: shallowdream204/BitDance-Tokenizer
6
+ language:
7
+ - en
8
+ tags:
9
+ - bitdance
10
+ - tokenizer
11
+ - autoencoder
12
+ - custom-architecture
13
+ - diffusers
14
+ ---
15
+
16
+ # BitDance-Tokenizer (Diffusers)
17
+
18
+ Diffusers-formatted BitDance tokenizer autoencoders (AE) converted from the upstream BitDance tokenizer checkpoints.
19
+
20
+ ## Available Autoencoders
21
+
22
+ - `ae_d16c32` (`z_channels=32`, `gan_decoder=false`)
23
+ - `ae_d32c128` (`z_channels=128`, `gan_decoder=true`)
24
+ - `ae_d32c256` (`z_channels=256`, `gan_decoder=true`)
25
+
26
+ Each subfolder includes:
27
+
28
+ - `config.json` with the autoencoder architecture
29
+ - `conversion_metadata.json` documenting the source checkpoint and config
30
+
31
+ ## Quickstart (native diffusers)
32
+
33
+ ```python
34
+ import torch
35
+ from diffusers import DiffusionPipeline
36
+
37
+ # Load a BitDance diffusers pipeline first (provides BitDanceAutoencoder class).
38
+ pipe = DiffusionPipeline.from_pretrained(
39
+ "BiliSakura/BitDance-14B-16x-diffusers",
40
+ trust_remote_code=True,
41
+ torch_dtype=torch.bfloat16,
42
+ ).to("cuda")
43
+
44
+ # Swap in a tokenizer autoencoder from this repository.
45
+ pipe.autoencoder = pipe.autoencoder.__class__.from_pretrained(
46
+ "BiliSakura/BitDance-Tokenizer-diffusers",
47
+ subfolder="ae_d16c32",
48
+ ).to("cuda")
49
+
50
+ image = pipe(
51
+ prompt="A watercolor painting of a red fox in a snowy forest.",
52
+ height=1024,
53
+ width=1024,
54
+ ).images[0]
55
+ image.save("bitdance_with_custom_tokenizer.png")
56
+ ```
57
+
58
+ > Note: this repository stores tokenizer autoencoder components; use `trust_remote_code=True` with a BitDance runtime repo when loading custom classes.
59
+
60
+ ## Citation
61
+
62
+ If you use this model, please cite BitDance and Diffusers:
63
+
64
+ ```bibtex
65
+ @article{ai2026bitdance,
66
+ title = {BitDance: Scaling Autoregressive Generative Models with Binary Tokens},
67
+ 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},
68
+ journal = {arXiv preprint arXiv:2602.14041},
69
+ year = {2026}
70
+ }
71
+
72
+ @inproceedings{von-platen-etal-2022-diffusers,
73
+ title = {Diffusers: State-of-the-art diffusion models},
74
+ author = {Patrick von Platen and Suraj Patil and Anton Lozhkov and Damar Jablonski and Hernan Bischof and Thomas Wolf},
75
+ booktitle = {GitHub repository},
76
+ year = {2022},
77
+ url = {https://github.com/huggingface/diffusers}
78
+ }
79
+ ```
80
+
81
+ ## License
82
+
83
+ This repository is distributed under the Apache-2.0 license, consistent with the upstream BitDance release.