Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,14 +30,12 @@ def generate_image(prompt, control_image_depth, control_mode_depth_index, use_de
|
|
30 |
conditioning_scales = []
|
31 |
|
32 |
if use_depth:
|
33 |
-
control_mode_depth = control_modes.index(control_mode_depth_index)
|
34 |
control_images.append(control_image_depth)
|
35 |
-
control_modes.append(
|
36 |
conditioning_scales.append(0.2)
|
37 |
|
38 |
-
control_mode_canny = control_modes.index(control_mode_canny_index)
|
39 |
control_images.append(control_image_canny)
|
40 |
-
control_modes.append(
|
41 |
conditioning_scales.append(0.4)
|
42 |
|
43 |
width, height = control_image_canny.size
|
@@ -61,10 +59,10 @@ iface = gr.Interface(
|
|
61 |
inputs=[
|
62 |
gr.Text(label="Prompt"),
|
63 |
gr.Image(label="Control Image (Depth)"),
|
64 |
-
gr.Dropdown(choices=control_modes, value=
|
65 |
gr.Checkbox(label="Use Depth Control Image", value=True),
|
66 |
gr.Image(label="Control Image (Canny)"),
|
67 |
-
gr.Dropdown(choices=control_modes, value=
|
68 |
],
|
69 |
outputs=gr.Image(label="Generated Image"),
|
70 |
title="FluxControlNet Image Generation",
|
|
|
30 |
conditioning_scales = []
|
31 |
|
32 |
if use_depth:
|
|
|
33 |
control_images.append(control_image_depth)
|
34 |
+
control_modes.append(control_mode_depth_index)
|
35 |
conditioning_scales.append(0.2)
|
36 |
|
|
|
37 |
control_images.append(control_image_canny)
|
38 |
+
control_modes.append(control_mode_canny_index)
|
39 |
conditioning_scales.append(0.4)
|
40 |
|
41 |
width, height = control_image_canny.size
|
|
|
59 |
inputs=[
|
60 |
gr.Text(label="Prompt"),
|
61 |
gr.Image(label="Control Image (Depth)"),
|
62 |
+
gr.Dropdown(choices=list(range(len(control_modes))), value=2, label="Control Mode (Depth)"),
|
63 |
gr.Checkbox(label="Use Depth Control Image", value=True),
|
64 |
gr.Image(label="Control Image (Canny)"),
|
65 |
+
gr.Dropdown(choices=list(range(len(control_modes))), value=0, label="Control Mode (Canny)")
|
66 |
],
|
67 |
outputs=gr.Image(label="Generated Image"),
|
68 |
title="FluxControlNet Image Generation",
|