File size: 630 Bytes
9798390
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# 使用示例

# 1. 安装依赖
pip install diffusers transformers torch accelerate

# 2. 使用模型
import torch
from diffusers import Lumina2Pipeline

# 从Hugging Face Hub加载
pipe = Lumina2Pipeline.from_pretrained(
    "neta-art/Neta-Lumina-diffusers", 
    torch_dtype=torch.bfloat16
)

# 生成图像
prompt = "1girl, beautiful, detailed, high quality, anime style"
negative_prompt = "low quality, low resolution, ugly, disgusting"

image = pipe(
    prompt,
    height=1024,
    width=1024,
    guidance_scale=7.5,
    num_inference_steps=50,
    negative_prompt=negative_prompt
).images[0]

image.save("output.png")