Spaces:
Runtime error
Runtime error
9 images + No pipeline progress
Browse files
app.py
CHANGED
|
@@ -62,13 +62,14 @@ def compile_transformer():
|
|
| 62 |
transformer_config = pipeline.transformer.config
|
| 63 |
pipeline.transformer = compile_transformer()
|
| 64 |
pipeline.transformer.config = transformer_config
|
|
|
|
| 65 |
|
| 66 |
|
| 67 |
@spaces.GPU
|
| 68 |
def generate_image(prompt: str, progress=gr.Progress(track_tqdm=True)):
|
| 69 |
t0 = datetime.now()
|
| 70 |
images = []
|
| 71 |
-
for _ in range(
|
| 72 |
image = pipeline(prompt, num_inference_steps=4).images[0]
|
| 73 |
elapsed = -(t0 - (t0 := datetime.now()))
|
| 74 |
images += [(image, f'{elapsed.total_seconds():.2f}s')]
|
|
|
|
| 62 |
transformer_config = pipeline.transformer.config
|
| 63 |
pipeline.transformer = compile_transformer()
|
| 64 |
pipeline.transformer.config = transformer_config
|
| 65 |
+
pipeline.set_progress_bar_config(disable=True)
|
| 66 |
|
| 67 |
|
| 68 |
@spaces.GPU
|
| 69 |
def generate_image(prompt: str, progress=gr.Progress(track_tqdm=True)):
|
| 70 |
t0 = datetime.now()
|
| 71 |
images = []
|
| 72 |
+
for _ in range(9):
|
| 73 |
image = pipeline(prompt, num_inference_steps=4).images[0]
|
| 74 |
elapsed = -(t0 - (t0 := datetime.now()))
|
| 75 |
images += [(image, f'{elapsed.total_seconds():.2f}s')]
|