Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,15 +6,15 @@ def generate_image(prompt, negative_prompt, seed, width, height, prior_inference
|
|
6 |
result = client.predict(
|
7 |
prompt,
|
8 |
negative_prompt,
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
)
|
19 |
return result
|
20 |
|
@@ -22,15 +22,7 @@ demo = gr.Interface(
|
|
22 |
fn=generate_image,
|
23 |
inputs=[
|
24 |
gr.Textbox(label="Prompt"),
|
25 |
-
gr.Textbox(label="Negative prompt"),
|
26 |
-
gr.Slider(label="Seed", minimum=0, maximum=2147483647, step=1),
|
27 |
-
gr.Slider(label="Width", minimum=1024, maximum=1536, step=1),
|
28 |
-
gr.Slider(label="Height", minimum=1024, maximum=1536, step=1),
|
29 |
-
gr.Slider(label="Prior Inference Steps", minimum=10, maximum=30, step=1),
|
30 |
-
gr.Slider(label="Prior Guidance Scale", minimum=0, maximum=20, step=1),
|
31 |
-
gr.Slider(label="Decoder Inference Steps", minimum=4, maximum=12, step=1),
|
32 |
-
gr.Slider(label="Decoder Guidance Scale", minimum=0, maximum=0, step=1),
|
33 |
-
gr.Slider(label="Number of Images", minimum=1, maximum=2, step=1),
|
34 |
],
|
35 |
outputs=["image"],
|
36 |
theme = "soft"
|
|
|
6 |
result = client.predict(
|
7 |
prompt,
|
8 |
negative_prompt,
|
9 |
+
0, # float (numeric value between 0 and 2147483647) in 'Seed' Slider component
|
10 |
+
1024, # float (numeric value between 1024 and 1536) in 'Width' Slider component
|
11 |
+
1024, # float (numeric value between 1024 and 1536) in 'Height' Slider component
|
12 |
+
10, # float (numeric value between 10 and 30) in 'Prior Inference Steps' Slider component
|
13 |
+
0, # float (numeric value between 0 and 20) in 'Prior Guidance Scale' Slider component
|
14 |
+
4, # float (numeric value between 4 and 12) in 'Decoder Inference Steps' Slider component
|
15 |
+
0, # float (numeric value between 0 and 0) in 'Decoder Guidance Scale' Slider component
|
16 |
+
1, # float (numeric value between 1 and 2) in 'Number of Images' Slider component
|
17 |
+
api_name="/run"
|
18 |
)
|
19 |
return result
|
20 |
|
|
|
22 |
fn=generate_image,
|
23 |
inputs=[
|
24 |
gr.Textbox(label="Prompt"),
|
25 |
+
gr.Textbox(label="Negative prompt", value="bad quality, low quality"),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
],
|
27 |
outputs=["image"],
|
28 |
theme = "soft"
|