Update app.py
Browse files
app.py
CHANGED
@@ -10,15 +10,8 @@ hf_token = os.getenv("HF_TOKEN")
|
|
10 |
# 使用 Hugging Face Token 登录
|
11 |
login(token=hf_token)
|
12 |
|
13 |
-
|
14 |
-
pipe
|
15 |
-
revision="main",
|
16 |
-
torch_dtype=torch.float16)
|
17 |
-
|
18 |
-
# 如果模型需要LoRA权重文件,可以手动加载
|
19 |
-
pipe.load_lora_weights("prithivMLmods/SD3.5-Large-Photorealistic-LoRA",
|
20 |
-
weight_name="Photorealistic-SD3.5-Large-LoRA.safetensors")
|
21 |
-
|
22 |
pipe.fuse_lora(lora_scale=1.0)
|
23 |
|
24 |
# 定义图像生成函数
|
|
|
10 |
# 使用 Hugging Face Token 登录
|
11 |
login(token=hf_token)
|
12 |
|
13 |
+
pipe = StableDiffusion3Pipeline.from_pretrained("stabilityai/stable-diffusion-3.5-large", torch_dtype=torch.bfloat16)
|
14 |
+
pipe.load_lora_weights("prithivMLmods/SD3.5-Large-Photorealistic-LoRA", weight_name="Photorealistic-SD3.5-Large-LoRA.safetensors")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
pipe.fuse_lora(lora_scale=1.0)
|
16 |
|
17 |
# 定义图像生成函数
|