Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,6 +36,9 @@ else:
|
|
| 36 |
)
|
| 37 |
pipe = pipe.to(device)
|
| 38 |
|
|
|
|
|
|
|
|
|
|
| 39 |
pipe.scheduler = LCMScheduler.from_pretrained(
|
| 40 |
"PixArt-alpha/PixArt-XL-2-1024-MS",
|
| 41 |
subfolder="scheduler",
|
|
@@ -65,7 +68,7 @@ def infer(prompt, seed, randomize_seed):
|
|
| 65 |
examples = [
|
| 66 |
"The image showcases a freshly baked bread, possibly focaccia, with rosemary sprigs and red pepper flakes sprinkled on top. It's sliced and placed on a wire cooling rack, with a bowl of mixed peppercorns beside it.",
|
| 67 |
"A raccoon reading a book in a lush forest.",
|
| 68 |
-
"A
|
| 69 |
]
|
| 70 |
|
| 71 |
css="""
|
|
|
|
| 36 |
)
|
| 37 |
pipe = pipe.to(device)
|
| 38 |
|
| 39 |
+
pipe.text_encoder.to_bettertransformer()
|
| 40 |
+
pipe.transformer = torch.compile(pipe.transformer, mode="reduce-overhead", fullgraph=True)
|
| 41 |
+
|
| 42 |
pipe.scheduler = LCMScheduler.from_pretrained(
|
| 43 |
"PixArt-alpha/PixArt-XL-2-1024-MS",
|
| 44 |
subfolder="scheduler",
|
|
|
|
| 68 |
examples = [
|
| 69 |
"The image showcases a freshly baked bread, possibly focaccia, with rosemary sprigs and red pepper flakes sprinkled on top. It's sliced and placed on a wire cooling rack, with a bowl of mixed peppercorns beside it.",
|
| 70 |
"A raccoon reading a book in a lush forest.",
|
| 71 |
+
"A small cactus with a happy face in the Sahara desert.",
|
| 72 |
]
|
| 73 |
|
| 74 |
css="""
|