Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -37,10 +37,6 @@ model_num_of_layers = {
|
|
37 |
'Stable Diffusion 2.1': 22,
|
38 |
}
|
39 |
|
40 |
-
num_rows_dict = {
|
41 |
-
'Stable Diffusion 1.4': 2,
|
42 |
-
'Stable Diffusion 2.1': 4,
|
43 |
-
}
|
44 |
|
45 |
def generate_images(prompt, model, seed):
|
46 |
seed = random.randint(0, MAX_SEED) if seed == -1 else seed
|
@@ -98,9 +94,9 @@ with gr.Blocks() as demo:
|
|
98 |
|
99 |
|
100 |
generate_button = gr.Button("Generate Image")
|
101 |
-
|
102 |
with gr.Column():
|
103 |
-
gallery = gr.Gallery(label="Generated Images", columns=6, rows=
|
104 |
|
105 |
outputs = [gallery]
|
106 |
|
|
|
37 |
'Stable Diffusion 2.1': 22,
|
38 |
}
|
39 |
|
|
|
|
|
|
|
|
|
40 |
|
41 |
def generate_images(prompt, model, seed):
|
42 |
seed = random.randint(0, MAX_SEED) if seed == -1 else seed
|
|
|
94 |
|
95 |
|
96 |
generate_button = gr.Button("Generate Image")
|
97 |
+
|
98 |
with gr.Column():
|
99 |
+
gallery = gr.Gallery(label="Generated Images", columns=6, rows=1, object_fit="contain", height="auto")
|
100 |
|
101 |
outputs = [gallery]
|
102 |
|