Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import torch
|
| 2 |
import spaces
|
| 3 |
import gradio as gr
|
| 4 |
-
from diffusers import
|
| 5 |
|
| 6 |
# Load the pipeline once at startup
|
| 7 |
print("Loading Z-Image-Turbo pipeline...")
|
|
@@ -11,12 +11,12 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
| 11 |
low_cpu_mem_usage=False,
|
| 12 |
)
|
| 13 |
|
| 14 |
-
pipe.load_lora_weights("
|
| 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 |
|
|
|
|
| 1 |
import torch
|
| 2 |
import spaces
|
| 3 |
import gradio as gr
|
| 4 |
+
from diffusers import ZImagePipeline
|
| 5 |
|
| 6 |
# Load the pipeline once at startup
|
| 7 |
print("Loading Z-Image-Turbo pipeline...")
|
|
|
|
| 11 |
low_cpu_mem_usage=False,
|
| 12 |
)
|
| 13 |
|
| 14 |
+
pipe.load_lora_weights("renderartist/Technically-Color-Z-Image-Turbo", weights_name="Technically_Color_Z_Image_Turbo_v1_renderartist_2000.safetensors")
|
| 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 |
|