Spaces:
Running
on
Zero
Running
on
Zero
Re-enable cache, remove duration
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def select_scheduler(scheduler_name):
|
|
50 |
scheduler = scheduler.from_config(pipe.scheduler.config, **add_kwargs)
|
51 |
return scheduler
|
52 |
|
53 |
-
@spaces.GPU
|
54 |
def predict(left_prompt, center_prompt, right_prompt, negative_prompt, left_gs, center_gs, right_gs, overlap_pixels, steps, generation_seed, scheduler, tile_height, tile_width, target_height, target_width):
|
55 |
global pipe
|
56 |
|
@@ -387,7 +387,7 @@ with gr.Blocks(css=css) as app:
|
|
387 |
inputs=[left_prompt, center_prompt, right_prompt, negative_prompt, left_gs, center_gs, right_gs, overlap, steps, generation_seed, scheduler, tile_height, tile_width, height, width, max_tile_size],
|
388 |
fn=run_for_examples,
|
389 |
outputs=result,
|
390 |
-
cache_examples=
|
391 |
)
|
392 |
|
393 |
event_calc_tile_size={"fn": do_calc_tile, "inputs":[height, width, overlap, max_tile_size], "outputs":[tile_height, tile_width, new_target_height, new_target_width]}
|
|
|
50 |
scheduler = scheduler.from_config(pipe.scheduler.config, **add_kwargs)
|
51 |
return scheduler
|
52 |
|
53 |
+
@spaces.GPU
|
54 |
def predict(left_prompt, center_prompt, right_prompt, negative_prompt, left_gs, center_gs, right_gs, overlap_pixels, steps, generation_seed, scheduler, tile_height, tile_width, target_height, target_width):
|
55 |
global pipe
|
56 |
|
|
|
387 |
inputs=[left_prompt, center_prompt, right_prompt, negative_prompt, left_gs, center_gs, right_gs, overlap, steps, generation_seed, scheduler, tile_height, tile_width, height, width, max_tile_size],
|
388 |
fn=run_for_examples,
|
389 |
outputs=result,
|
390 |
+
cache_examples=True
|
391 |
)
|
392 |
|
393 |
event_calc_tile_size={"fn": do_calc_tile, "inputs":[height, width, overlap, max_tile_size], "outputs":[tile_height, tile_width, new_target_height, new_target_width]}
|