Views
No views yet

1import torch
2from pipeline_walkyrie import pipeline_walkyrie
3from diffusers import AutoencoderKLWan
4from PIL import Image
5
6
7device = "cuda" if torch.cuda.is_available() else "cpu"
8model_dtype = torch.bfloat16
9model_id = "kpsss34/Walkyrie-1.3B-v2.0"
10
11pipe = pipeline_walkyrie.from_pretrained(
12 model_id,
13 torch_dtype=model_dtype
14)
15pipe.to(device)
16
17#pipe.load_lora_weights("lora.safetensors")
18
19prompt = "a portrait of a young woman in a nightclub, cinematic film still, ultra wide aspect ratio, oval bokeh, soft highlight bloom, teal orange grading, film grain, moody lighting"
20
21height = 1024
22width = 1024
23num_inference_steps = 20
24guidance_scale = 1.0
25
26generator = torch.Generator(device=device).manual_seed(0)
27output = pipe(
28 prompt=prompt,
29 height=height,
30 width=width,
31 num_inference_steps=num_inference_steps,
32 guidance_scale=guidance_scale,
33 generator=generator,
34 output_type="pil"
35).frames[0]
36
37output.save("output.png")
38