Instructions to use BiliSakura/BitDance-Tokenizer-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use BiliSakura/BitDance-Tokenizer-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("BiliSakura/BitDance-Tokenizer-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
| SUPPORTED_IMAGE_SIZES = [ | |
| # 1024px area | |
| [2048, 512], | |
| [1920, 512], | |
| [1536, 640], | |
| [1280, 768], | |
| [1152, 896], | |
| [1024, 1024], | |
| [896, 1152], | |
| [768, 1280], | |
| [640, 1536], | |
| [512, 1920], | |
| [512, 2048], | |
| # 512px area | |
| [1024, 256], | |
| [896, 256], | |
| [640, 384], | |
| [512, 512], | |
| [384, 640], | |
| [256, 896], | |
| [256, 1024], | |
| ] | |