BitDance-14B-16x-diffusers / test_bitdance.py
BiliSakura's picture
Update all files for BitDance-14B-16x-diffusers
1cca061 verified
import sys
from pathlib import Path
import torch
from diffusers import DiffusionPipeline
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_16x.png")
print("Saved bitdance_14b_16x.png")