Spaces:
Running
Running
limit number of steps for demo
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ from game_of_life import GameOfLife
|
|
| 10 |
from utils import resize_image, generate_image_from_grid
|
| 11 |
|
| 12 |
|
| 13 |
-
@spaces.GPU(duration=
|
| 14 |
def generate_all_images(
|
| 15 |
gol_grids: list[np.array],
|
| 16 |
source_image: Image,
|
|
@@ -131,7 +131,7 @@ num_gol_steps = gr.Slider(
|
|
| 131 |
minimum=2,
|
| 132 |
maximum=100,
|
| 133 |
step=1,
|
| 134 |
-
value=
|
| 135 |
)
|
| 136 |
gol_grid_dim = gr.Number(
|
| 137 |
label="Game of Life Grid Dimension",
|
|
@@ -163,6 +163,8 @@ demo = gr.Interface(
|
|
| 163 |
],
|
| 164 |
outputs=[output_controlnet, output_gol],
|
| 165 |
title="ControlNet Game of Life",
|
| 166 |
-
description="Generate a Game of Life grid and then use ControlNet to enhance the image based on the grid, a reference image and a prompt.
|
|
|
|
|
|
|
| 167 |
)
|
| 168 |
demo.launch(debug=True)
|
|
|
|
| 10 |
from utils import resize_image, generate_image_from_grid
|
| 11 |
|
| 12 |
|
| 13 |
+
@spaces.GPU(duration=80)
|
| 14 |
def generate_all_images(
|
| 15 |
gol_grids: list[np.array],
|
| 16 |
source_image: Image,
|
|
|
|
| 131 |
minimum=2,
|
| 132 |
maximum=100,
|
| 133 |
step=1,
|
| 134 |
+
value=6,
|
| 135 |
)
|
| 136 |
gol_grid_dim = gr.Number(
|
| 137 |
label="Game of Life Grid Dimension",
|
|
|
|
| 163 |
],
|
| 164 |
outputs=[output_controlnet, output_gol],
|
| 165 |
title="ControlNet Game of Life",
|
| 166 |
+
description="""Generate a Game of Life grid and then use ControlNet to enhance the image based on the grid, a reference image and a prompt.
|
| 167 |
+
For more information, check out this [blog post](https://www.jerpint.io/blog/diffusion-gol/).
|
| 168 |
+
""",
|
| 169 |
)
|
| 170 |
demo.launch(debug=True)
|