gengs commited on
Commit
9587d2a
1 Parent(s): 6984be1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
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 = StableDiffusion3Pipeline.from_pretrained("prithivMLmods/SD3.5-Large-Photorealistic-LoRA",
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
  # 定义图像生成函数