Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,8 @@ 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...")
|
|
@@ -27,9 +27,9 @@ pipe = DiffusionPipeline.from_pretrained(
|
|
| 27 |
|
| 28 |
#pipe.transformer.set_attention_backend(attention_backend)
|
| 29 |
|
| 30 |
-
if enable_compile:
|
| 31 |
-
|
| 32 |
-
|
| 33 |
|
| 34 |
pipe.to("cuda")
|
| 35 |
|
|
|
|
| 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...")
|
|
|
|
| 27 |
|
| 28 |
#pipe.transformer.set_attention_backend(attention_backend)
|
| 29 |
|
| 30 |
+
# if enable_compile:
|
| 31 |
+
# print("Compiling transformer...")
|
| 32 |
+
# pipe.transformer = torch.compile(pipe.transformer, mode="max-autotune-no-cudagraphs", fullgraph=False)
|
| 33 |
|
| 34 |
pipe.to("cuda")
|
| 35 |
|