Commit
•
b08b4dd
1
Parent(s):
05d2602
update seed input
Browse files
app.py
CHANGED
@@ -8,10 +8,10 @@ def main(
|
|
8 |
input_im,
|
9 |
scale=3.0,
|
10 |
n_samples=4,
|
11 |
-
seed=0,
|
12 |
steps=25,
|
|
|
13 |
):
|
14 |
-
generator = torch.Generator(device=device).manual_seed(seed)
|
15 |
|
16 |
images_list = pipe(
|
17 |
n_samples*[input_im],
|
@@ -66,13 +66,7 @@ inputs = [
|
|
66 |
gr.Slider(0, 25, value=3, step=1, label="Guidance scale"),
|
67 |
gr.Slider(1, 4, value=1, step=1, label="Number images"),
|
68 |
gr.Slider(5, 50, value=25, step=5, label="Steps"),
|
69 |
-
gr.
|
70 |
-
label="Seed",
|
71 |
-
minimum=0,
|
72 |
-
maximum=2147483647,
|
73 |
-
step=1,
|
74 |
-
randomize=True,
|
75 |
-
)
|
76 |
]
|
77 |
output = gr.Gallery(label="Generated variations")
|
78 |
output.style(grid=2)
|
|
|
8 |
input_im,
|
9 |
scale=3.0,
|
10 |
n_samples=4,
|
|
|
11 |
steps=25,
|
12 |
+
seed=0,
|
13 |
):
|
14 |
+
generator = torch.Generator(device=device).manual_seed(int(seed))
|
15 |
|
16 |
images_list = pipe(
|
17 |
n_samples*[input_im],
|
|
|
66 |
gr.Slider(0, 25, value=3, step=1, label="Guidance scale"),
|
67 |
gr.Slider(1, 4, value=1, step=1, label="Number images"),
|
68 |
gr.Slider(5, 50, value=25, step=5, label="Steps"),
|
69 |
+
gr.Number(0, 1024, value=0, step=1, labal="Seed")
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
]
|
71 |
output = gr.Gallery(label="Generated variations")
|
72 |
output.style(grid=2)
|