Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
-
|
| 19 |
-
|
| 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 |
|