Views
No views yet

1import torch
2from diffusers import Lumina2Pipeline
3
4pipe = Lumina2Pipeline.from_pretrained("duongve/Lumina-Yume-v0.1", 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 = "There are three girls. The girl on the left side has a long black hair and blue eyes. The girls on the right side has pink hair and yellow eyes. The girl on the middle has a short blonde hair and orange eyes. They are on the park"
8image = pipe(
9 prompt,
10 height=1216,
11 width=832,
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 system_prompt="You are an assistant designed to generate superior anime images with the superior degree of image-text alignment based on textual prompts or user prompts.",
18
19).images[0]
20image.save("luminayume_demo.png") You are an advanced assistant designed to generate high-quality images from user prompts, utilizing danbooru tags to accurately guide the image creation process.
You are an assistant designed to generate high-quality images based on user prompts and danbooru tags. You are an assistant designed to generate superior images with the superior degree of image-text alignment based on textual prompts or user prompts.
You are an assistant designed to generate high-quality images with the highest degree of image-text alignment based on textual prompts.