Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,10 +12,7 @@ import random
|
|
| 12 |
import re
|
| 13 |
import sys
|
| 14 |
import warnings
|
| 15 |
-
# ENABLE_COMPILE = os.environ.get("ENABLE_COMPILE", "true").lower() == "true"
|
| 16 |
-
# ENABLE_WARMUP = os.environ.get("ENABLE_WARMUP", "true").lower() == "true"
|
| 17 |
|
| 18 |
-
# Load the pipeline once at startup
|
| 19 |
print("Loading Z-Image-Turbo pipeline...")
|
| 20 |
pipe = DiffusionPipeline.from_pretrained(
|
| 21 |
"Tongyi-MAI/Z-Image-Turbo",#"T5B/Z-Image-Turbo-FP8",
|
|
@@ -24,7 +21,6 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
| 24 |
attn_implementation="kernels-community/vllm-flash-attn3",
|
| 25 |
)
|
| 26 |
|
| 27 |
-
|
| 28 |
pipe.transformer.layers._repeated_blocks = ["ZImageTransformerBlock"]
|
| 29 |
|
| 30 |
@spaces.GPU
|
|
|
|
| 12 |
import re
|
| 13 |
import sys
|
| 14 |
import warnings
|
|
|
|
|
|
|
| 15 |
|
|
|
|
| 16 |
print("Loading Z-Image-Turbo pipeline...")
|
| 17 |
pipe = DiffusionPipeline.from_pretrained(
|
| 18 |
"Tongyi-MAI/Z-Image-Turbo",#"T5B/Z-Image-Turbo-FP8",
|
|
|
|
| 21 |
attn_implementation="kernels-community/vllm-flash-attn3",
|
| 22 |
)
|
| 23 |
|
|
|
|
| 24 |
pipe.transformer.layers._repeated_blocks = ["ZImageTransformerBlock"]
|
| 25 |
|
| 26 |
@spaces.GPU
|