Views
No views yet
1import torch
2from diffusers import Lumina2Pipeline
3
4pipe = Lumina2Pipeline.from_pretrained("VirtualAddressExtension/Neta-Lumina-v1.0-diffusers", torch_dtype=torch.bfloat16)
5pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
6
7prompt = "You are an assistant designed to generate anime images based on textual prompts. <Prompt Start> neta, @quasarcake, 1girl, solo, 1girl,solo,bangs,black hair,purple eyes,pink hair,purple hair,multicolored hair,virtual youtuber,hair bun,streaked hair,double bun, school uniform, white shirt, pleated skirt, gentle smile, looking at viewer, sitting, upper body, close-up, soft lighting, depth of field, cherry blossom background, warm lighting, best quality"
8image = pipe(
9 prompt,
10 height=1024,
11 width=1024,
12 guidance_scale=4.0,
13 num_inference_steps=50,
14 cfg_trunc_ratio=0.25,
15 cfg_normalization=True,
16 generator=torch.Generator("cpu").manual_seed(0)
17).images[0]
18image.save("lumina_demo.png")