Instructions to use BiliSakura/BitDance-14B-64x-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use BiliSakura/BitDance-14B-64x-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("BiliSakura/BitDance-14B-64x-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
File size: 1,108 Bytes
098d63b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import sys
from pathlib import Path
import torch
from diffusers import DiffusionPipeline
# Use local path - add to sys.path so custom pipeline (bitdance_diffusers) is found
model_path = Path(__file__).resolve().parent
sys.path.insert(0, str(model_path))
pipe = DiffusionPipeline.from_pretrained(
str(model_path),
custom_pipeline=str(model_path),
torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
result = pipe(
prompt="A close-up portrait in a cinematic photography style, capturing a girl-next-door look on a sunny daytime urban street. She wears a khaki sweater, with long, flowing hair gently draped over her shoulders. Her head is turned slightly, revealing soft facial features illuminated by realistic, delicate sunlight coming from the left. The sunlight subtly highlights individual strands of her hair. The image has a Canon film-like color tone, evoking a warm nostalgic atmosphere.",
height=1024,
width=1024,
num_inference_steps=50,
guidance_scale=7.5,
show_progress_bar=True,
)
result.images[0].save("bitdance_14b_64x.png")
print("Saved bitdance_14b_64x.png")
|