Imosu's picture
download
raw
1.02 kB
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")

Xet Storage Details

Size:
1.02 kB
·
Xet hash:
786e7f82d85d0941a5eaf5eae57298039dd8548f0b76966cbdc289044328df3a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.