linoyts HF Staff commited on
Commit
dab04f5
·
verified ·
1 Parent(s): 84489e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -10,13 +10,15 @@ pipe = ZImagePipeline.from_pretrained(
10
  torch_dtype=torch.bfloat16,
11
  low_cpu_mem_usage=False,
12
  )
13
- pipe.load_lora_weights("bdsqlsz/qinglong_DetailedEyes_Z-Image", weight_name="qinglong_detailedeye_z-imageV2(comfy).safetensors")
14
-
 
 
15
  pipe.to("cuda")
16
 
17
  # ======== AoTI compilation + FA3 ========
18
- # pipe.transformer.layers._repeated_blocks = ["ZImageTransformerBlock"]
19
- # spaces.aoti_blocks_load(pipe.transformer.layers, "zerogpu-aoti/Z-Image", variant="fa3")
20
 
21
  print("Pipeline loaded!")
22
 
 
10
  torch_dtype=torch.bfloat16,
11
  low_cpu_mem_usage=False,
12
  )
13
+ pipe.load_lora_weights("bdsqlsz/qinglong_DetailedEyes_Z-Image", weight_name="qinglong_detailedeye_z-imageV2(comfy).safetensors", adapter_name="lora")
14
+ pipe.set_adapters(["lora",], adapter_weights=[1.])
15
+ pipe.fuse_lora(adapter_names=["lora"], lora_scale=1.)
16
+ pipe.unload_lora_weights()
17
  pipe.to("cuda")
18
 
19
  # ======== AoTI compilation + FA3 ========
20
+ pipe.transformer.layers._repeated_blocks = ["ZImageTransformerBlock"]
21
+ spaces.aoti_blocks_load(pipe.transformer.layers, "zerogpu-aoti/Z-Image", variant="fa3")
22
 
23
  print("Pipeline loaded!")
24