Spaces:
Runtime error
Runtime error
Update
Browse files- app_canny.py +2 -2
- app_depth.py +2 -2
- app_ip2p.py +2 -2
- app_lineart.py +2 -2
- app_mlsd.py +2 -2
- app_normal.py +2 -2
- app_openpose.py +2 -2
- app_scribble.py +2 -2
- app_scribble_interactive.py +4 -4
- app_segmentation.py +2 -2
- app_shuffle.py +2 -2
- app_softedge.py +2 -2
- settings.py +1 -0
app_canny.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -21,7 +21,7 @@ def create_demo(process):
|
|
21 |
step=1)
|
22 |
image_resolution = gr.Slider(label='Image resolution',
|
23 |
minimum=256,
|
24 |
-
maximum=
|
25 |
value=512,
|
26 |
step=256)
|
27 |
canny_low_threshold = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
21 |
step=1)
|
22 |
image_resolution = gr.Slider(label='Image resolution',
|
23 |
minimum=256,
|
24 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
25 |
value=512,
|
26 |
step=256)
|
27 |
canny_low_threshold = gr.Slider(
|
app_depth.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -26,7 +26,7 @@ def create_demo(process):
|
|
26 |
step=1)
|
27 |
image_resolution = gr.Slider(label='Image resolution',
|
28 |
minimum=256,
|
29 |
-
maximum=
|
30 |
value=512,
|
31 |
step=256)
|
32 |
preprocess_resolution = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
26 |
step=1)
|
27 |
image_resolution = gr.Slider(label='Image resolution',
|
28 |
minimum=256,
|
29 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
30 |
value=512,
|
31 |
step=256)
|
32 |
preprocess_resolution = gr.Slider(
|
app_ip2p.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -21,7 +21,7 @@ def create_demo(process):
|
|
21 |
step=1)
|
22 |
image_resolution = gr.Slider(label='Image resolution',
|
23 |
minimum=256,
|
24 |
-
maximum=
|
25 |
value=512,
|
26 |
step=256)
|
27 |
num_steps = gr.Slider(label='Number of steps',
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
21 |
step=1)
|
22 |
image_resolution = gr.Slider(label='Image resolution',
|
23 |
minimum=256,
|
24 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
25 |
value=512,
|
26 |
step=256)
|
27 |
num_steps = gr.Slider(label='Number of steps',
|
app_lineart.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -35,7 +35,7 @@ def create_demo(process):
|
|
35 |
step=1)
|
36 |
image_resolution = gr.Slider(label='Image resolution',
|
37 |
minimum=256,
|
38 |
-
maximum=
|
39 |
value=512,
|
40 |
step=256)
|
41 |
preprocess_resolution = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
35 |
step=1)
|
36 |
image_resolution = gr.Slider(label='Image resolution',
|
37 |
minimum=256,
|
38 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
39 |
value=512,
|
40 |
step=256)
|
41 |
preprocess_resolution = gr.Slider(
|
app_mlsd.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -21,7 +21,7 @@ def create_demo(process):
|
|
21 |
step=1)
|
22 |
image_resolution = gr.Slider(label='Image resolution',
|
23 |
minimum=256,
|
24 |
-
maximum=
|
25 |
value=512,
|
26 |
step=256)
|
27 |
preprocess_resolution = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
21 |
step=1)
|
22 |
image_resolution = gr.Slider(label='Image resolution',
|
23 |
minimum=256,
|
24 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
25 |
value=512,
|
26 |
step=256)
|
27 |
preprocess_resolution = gr.Slider(
|
app_normal.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -25,7 +25,7 @@ def create_demo(process):
|
|
25 |
step=1)
|
26 |
image_resolution = gr.Slider(label='Image resolution',
|
27 |
minimum=256,
|
28 |
-
maximum=
|
29 |
value=512,
|
30 |
step=256)
|
31 |
preprocess_resolution = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
25 |
step=1)
|
26 |
image_resolution = gr.Slider(label='Image resolution',
|
27 |
minimum=256,
|
28 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
29 |
value=512,
|
30 |
step=256)
|
31 |
preprocess_resolution = gr.Slider(
|
app_openpose.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -25,7 +25,7 @@ def create_demo(process):
|
|
25 |
step=1)
|
26 |
image_resolution = gr.Slider(label='Image resolution',
|
27 |
minimum=256,
|
28 |
-
maximum=
|
29 |
value=512,
|
30 |
step=256)
|
31 |
preprocess_resolution = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
25 |
step=1)
|
26 |
image_resolution = gr.Slider(label='Image resolution',
|
27 |
minimum=256,
|
28 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
29 |
value=512,
|
30 |
step=256)
|
31 |
preprocess_resolution = gr.Slider(
|
app_scribble.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -26,7 +26,7 @@ def create_demo(process):
|
|
26 |
step=1)
|
27 |
image_resolution = gr.Slider(label='Image resolution',
|
28 |
minimum=256,
|
29 |
-
maximum=
|
30 |
value=512,
|
31 |
step=256)
|
32 |
preprocess_resolution = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
26 |
step=1)
|
27 |
image_resolution = gr.Slider(label='Image resolution',
|
28 |
minimum=256,
|
29 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
30 |
value=512,
|
31 |
step=256)
|
32 |
preprocess_resolution = gr.Slider(
|
app_scribble_interactive.py
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
|
6 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
7 |
from utils import randomize_seed_fn
|
8 |
|
9 |
|
@@ -17,12 +17,12 @@ def create_demo(process):
|
|
17 |
with gr.Column():
|
18 |
canvas_width = gr.Slider(label='Canvas width',
|
19 |
minimum=256,
|
20 |
-
maximum=
|
21 |
value=512,
|
22 |
step=1)
|
23 |
canvas_height = gr.Slider(label='Canvas height',
|
24 |
minimum=256,
|
25 |
-
maximum=
|
26 |
value=512,
|
27 |
step=1)
|
28 |
create_button = gr.Button('Open drawing canvas!')
|
@@ -37,7 +37,7 @@ def create_demo(process):
|
|
37 |
step=1)
|
38 |
image_resolution = gr.Slider(label='Image resolution',
|
39 |
minimum=256,
|
40 |
-
maximum=
|
41 |
value=512,
|
42 |
step=256)
|
43 |
num_steps = gr.Slider(label='Number of steps',
|
|
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
|
6 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
7 |
from utils import randomize_seed_fn
|
8 |
|
9 |
|
|
|
17 |
with gr.Column():
|
18 |
canvas_width = gr.Slider(label='Canvas width',
|
19 |
minimum=256,
|
20 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
21 |
value=512,
|
22 |
step=1)
|
23 |
canvas_height = gr.Slider(label='Canvas height',
|
24 |
minimum=256,
|
25 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
26 |
value=512,
|
27 |
step=1)
|
28 |
create_button = gr.Button('Open drawing canvas!')
|
|
|
37 |
step=1)
|
38 |
image_resolution = gr.Slider(label='Image resolution',
|
39 |
minimum=256,
|
40 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
41 |
value=512,
|
42 |
step=256)
|
43 |
num_steps = gr.Slider(label='Number of steps',
|
app_segmentation.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -25,7 +25,7 @@ def create_demo(process):
|
|
25 |
step=1)
|
26 |
image_resolution = gr.Slider(label='Image resolution',
|
27 |
minimum=256,
|
28 |
-
maximum=
|
29 |
value=512,
|
30 |
step=256)
|
31 |
preprocess_resolution = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
25 |
step=1)
|
26 |
image_resolution = gr.Slider(label='Image resolution',
|
27 |
minimum=256,
|
28 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
29 |
value=512,
|
30 |
step=256)
|
31 |
preprocess_resolution = gr.Slider(
|
app_shuffle.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -26,7 +26,7 @@ def create_demo(process):
|
|
26 |
step=1)
|
27 |
image_resolution = gr.Slider(label='Image resolution',
|
28 |
minimum=256,
|
29 |
-
maximum=
|
30 |
value=512,
|
31 |
step=256)
|
32 |
num_steps = gr.Slider(label='Number of steps',
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
26 |
step=1)
|
27 |
image_resolution = gr.Slider(label='Image resolution',
|
28 |
minimum=256,
|
29 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
30 |
value=512,
|
31 |
step=256)
|
32 |
num_steps = gr.Slider(label='Number of steps',
|
app_softedge.py
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
-
from settings import DEFAULT_NUM_IMAGES, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
@@ -31,7 +31,7 @@ def create_demo(process):
|
|
31 |
step=1)
|
32 |
image_resolution = gr.Slider(label='Image resolution',
|
33 |
minimum=256,
|
34 |
-
maximum=
|
35 |
value=512,
|
36 |
step=256)
|
37 |
preprocess_resolution = gr.Slider(
|
|
|
2 |
|
3 |
import gradio as gr
|
4 |
|
5 |
+
from settings import DEFAULT_NUM_IMAGES, MAX_IMAGE_RESOLUTION, MAX_NUM_IMAGES
|
6 |
from utils import randomize_seed_fn
|
7 |
|
8 |
|
|
|
31 |
step=1)
|
32 |
image_resolution = gr.Slider(label='Image resolution',
|
33 |
minimum=256,
|
34 |
+
maximum=MAX_IMAGE_RESOLUTION,
|
35 |
value=512,
|
36 |
step=256)
|
37 |
preprocess_resolution = gr.Slider(
|
settings.py
CHANGED
@@ -6,6 +6,7 @@ DEFAULT_MODEL_ID = os.getenv('DEFAULT_MODEL_ID',
|
|
6 |
MAX_NUM_IMAGES = int(os.getenv('MAX_NUM_IMAGES', '3'))
|
7 |
DEFAULT_NUM_IMAGES = min(MAX_NUM_IMAGES,
|
8 |
int(os.getenv('DEFAULT_NUM_IMAGES', '1')))
|
|
|
9 |
|
10 |
ALLOW_CHANGING_BASE_MODEL = os.getenv('SPACE_ID') != 'hysts/ControlNet-v1-1'
|
11 |
SHOW_DUPLICATE_BUTTON = os.getenv('SHOW_DUPLICATE_BUTTON') == '1'
|
|
|
6 |
MAX_NUM_IMAGES = int(os.getenv('MAX_NUM_IMAGES', '3'))
|
7 |
DEFAULT_NUM_IMAGES = min(MAX_NUM_IMAGES,
|
8 |
int(os.getenv('DEFAULT_NUM_IMAGES', '1')))
|
9 |
+
MAX_IMAGE_RESOLUTION = int(os.getenv('MAX_IMAGE_RESOLUTION', '768'))
|
10 |
|
11 |
ALLOW_CHANGING_BASE_MODEL = os.getenv('SPACE_ID') != 'hysts/ControlNet-v1-1'
|
12 |
SHOW_DUPLICATE_BUTTON = os.getenv('SHOW_DUPLICATE_BUTTON') == '1'
|