Spaces:
Runtime error
Runtime error
Update app_depth.py
Browse files- app_depth.py +14 -1
app_depth.py
CHANGED
|
@@ -31,11 +31,22 @@ def create_demo(process):
|
|
| 31 |
prompt = gr.Textbox(label="Prompt")
|
| 32 |
run_button = gr.Button("Run")
|
| 33 |
with gr.Accordion("Advanced options", open=False):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
cfg_scale = gr.Slider(label="Guidance scale",
|
| 35 |
minimum=0.1,
|
| 36 |
maximum=30.0,
|
| 37 |
value=2,
|
| 38 |
step=0.1)
|
|
|
|
| 39 |
resolution = gr.Slider(label="(H, W)",
|
| 40 |
minimum=384,
|
| 41 |
maximum=768,
|
|
@@ -85,6 +96,8 @@ def create_demo(process):
|
|
| 85 |
top_k,
|
| 86 |
top_p,
|
| 87 |
seed,
|
|
|
|
|
|
|
| 88 |
]
|
| 89 |
prompt.submit(
|
| 90 |
fn=randomize_seed_fn,
|
|
@@ -108,7 +121,7 @@ def create_demo(process):
|
|
| 108 |
fn=process,
|
| 109 |
inputs=inputs,
|
| 110 |
outputs=result,
|
| 111 |
-
api_name="
|
| 112 |
)
|
| 113 |
return demo
|
| 114 |
|
|
|
|
| 31 |
prompt = gr.Textbox(label="Prompt")
|
| 32 |
run_button = gr.Button("Run")
|
| 33 |
with gr.Accordion("Advanced options", open=False):
|
| 34 |
+
preprocessor_name = gr.Radio(
|
| 35 |
+
label="Preprocessor",
|
| 36 |
+
choices=[
|
| 37 |
+
"depth",
|
| 38 |
+
"No preprocess",
|
| 39 |
+
],
|
| 40 |
+
type="value",
|
| 41 |
+
value="depth",
|
| 42 |
+
info='depth.',
|
| 43 |
+
)
|
| 44 |
cfg_scale = gr.Slider(label="Guidance scale",
|
| 45 |
minimum=0.1,
|
| 46 |
maximum=30.0,
|
| 47 |
value=2,
|
| 48 |
step=0.1)
|
| 49 |
+
control_strength = gr.Slider(minimum=0., maximum=1.0, step=0.1, value=1.0, label="control_strength")
|
| 50 |
resolution = gr.Slider(label="(H, W)",
|
| 51 |
minimum=384,
|
| 52 |
maximum=768,
|
|
|
|
| 96 |
top_k,
|
| 97 |
top_p,
|
| 98 |
seed,
|
| 99 |
+
control_strength,
|
| 100 |
+
preprocessor_name
|
| 101 |
]
|
| 102 |
prompt.submit(
|
| 103 |
fn=randomize_seed_fn,
|
|
|
|
| 121 |
fn=process,
|
| 122 |
inputs=inputs,
|
| 123 |
outputs=result,
|
| 124 |
+
api_name="depth",
|
| 125 |
)
|
| 126 |
return demo
|
| 127 |
|