Views
No views yet

7):1import sdnq # register the SDNQ backend before loading
2import torch
3from diffusers import DiffusionPipeline
4
5pipe = DiffusionPipeline.from_pretrained("OzzyGT/Krea_2_Turbo_sdnq_dynamic_4bit", torch_dtype=torch.bfloat16)
6pipe.to("cuda")
7
8prompt = (
9 "A cozy corner bookstore-cafe on a rainy evening, cinematic wide shot. "
10 'A large hand-lettered chalkboard sign in the window reads "FRESH COFFEE & OLD BOOKS" '
11 "and below it in smaller chalk letters \"open 'til late\". "
12 "Warm golden light spills onto wet cobblestones that mirror pink and blue neon reflections. "
13 "Inside, tall mahogany shelves are packed with hundreds of colorful book spines with tiny legible titles, "
14 "a barista in a striped apron pours delicate latte art, steam curling upward, "
15 "a tabby cat sleeps on a windowsill beside a stack of paperbacks. "
16 "Intricate detail, sharp focus, shallow depth of field, photorealistic, rich color grading."
17)
18
19image = pipe(
20 prompt,
21 num_inference_steps=8,
22 guidance_scale=0.0,
23 height=1024,
24 width=1024,
25 generator=torch.Generator("cuda").manual_seed(7),
26).images[0]
27image.save("sample.png")