Spaces:
Runtime error
Runtime error
inpainting outpainting
Browse files- annotator/inpainting/__init__.py +8 -7
- annotator/outpainting/__init__.py +12 -7
- app.py +34 -25
- requirements.txt +1 -1
annotator/inpainting/__init__.py
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
import numpy as np
|
2 |
|
3 |
class Inpainter:
|
4 |
-
def __call__(self, img,
|
5 |
h = img.shape[0]
|
6 |
w = img.shape[1]
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
12 |
img_new = img
|
13 |
-
img_new[
|
14 |
img_new = img_new.astype('ubyte')
|
15 |
return img_new
|
|
|
1 |
import numpy as np
|
2 |
|
3 |
class Inpainter:
|
4 |
+
def __call__(self, img, height_top_mask, height_down_mask, width_left_mask, width_right_mask):
|
5 |
h = img.shape[0]
|
6 |
w = img.shape[1]
|
7 |
+
h_top_mask = int(float(h) / 100.0 * float(height_top_mask))
|
8 |
+
h_down_mask = int(float(h) / 100.0 * float(height_down_mask))
|
9 |
+
|
10 |
+
w_left_mask = int(float(w) / 100.0 * float(width_left_mask))
|
11 |
+
w_right_mask = int(float(w) / 100.0 * float(width_right_mask))
|
12 |
+
|
13 |
img_new = img
|
14 |
+
img_new[h_top_mask:h_down_mask, w_left_mask:w_right_mask] = 0
|
15 |
img_new = img_new.astype('ubyte')
|
16 |
return img_new
|
annotator/outpainting/__init__.py
CHANGED
@@ -9,12 +9,17 @@
|
|
9 |
import numpy as np
|
10 |
|
11 |
class Outpainter:
|
12 |
-
def __call__(self, img,
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
19 |
img_new = img_new.astype('ubyte')
|
20 |
return img_new
|
|
|
9 |
import numpy as np
|
10 |
|
11 |
class Outpainter:
|
12 |
+
def __call__(self, img, height_top_extended, height_down_extended, width_left_extended, width_right_extended):
|
13 |
+
height, width, channel = img.shape
|
14 |
+
|
15 |
+
height_top_new = int(float(height) / 100.0 * float(height_top_extended))
|
16 |
+
height_down_new = int(float(height) / 100.0 * float(height_down_extended))
|
17 |
+
width_left_new = int(float(width) / 100.0 * float(width_left_extended))
|
18 |
+
width_right_new = int(float(width) / 100.0 * float(width_right_extended))
|
19 |
+
|
20 |
+
new_height = height + height_top_new + height_down_new
|
21 |
+
new_width = width + width_left_new + width_right_new
|
22 |
+
img_new = np.zeros([new_height, new_width, channel])
|
23 |
+
img_new[height_top_new: (height + height_top_new), width_left_new: (width + width_left_new), : ] = img
|
24 |
img_new = img_new.astype('ubyte')
|
25 |
return img_new
|
app.py
CHANGED
@@ -54,9 +54,9 @@ def midas(img, res):
|
|
54 |
return results
|
55 |
|
56 |
|
57 |
-
def outpainting(img, res,
|
58 |
img = resize_image(HWC3(img), res)
|
59 |
-
result = model_outpainting(img,
|
60 |
return result
|
61 |
|
62 |
|
@@ -72,9 +72,9 @@ def blur(img, res, ksize):
|
|
72 |
return result
|
73 |
|
74 |
|
75 |
-
def inpainting(img, res,
|
76 |
img = resize_image(HWC3(img), res)
|
77 |
-
result = model_inpainting(img,
|
78 |
return result
|
79 |
|
80 |
model = create_model('./models/cldm_v15_unicontrol.yaml').cpu()
|
@@ -631,13 +631,13 @@ def process_bbox(input_image, prompt, a_prompt, n_prompt, num_samples, image_res
|
|
631 |
|
632 |
|
633 |
def process_outpainting(input_image, prompt, a_prompt, n_prompt, num_samples, image_resolution, ddim_steps, guess_mode,
|
634 |
-
strength, scale, seed, eta,
|
635 |
with torch.no_grad():
|
636 |
input_image = HWC3(input_image)
|
637 |
img = resize_image(input_image, image_resolution)
|
638 |
H, W, C = img.shape
|
639 |
if condition_mode == True:
|
640 |
-
detected_map = outpainting(input_image, image_resolution,
|
641 |
else:
|
642 |
detected_map = img
|
643 |
|
@@ -987,7 +987,7 @@ with demo:
|
|
987 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
988 |
step=64)
|
989 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
990 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=True)
|
991 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
992 |
low_threshold = gr.Slider(label="Canny low threshold", minimum=1, maximum=255, value=40, step=1)
|
993 |
high_threshold = gr.Slider(label="Canny high threshold", minimum=1, maximum=255, value=200,
|
@@ -1018,7 +1018,7 @@ with demo:
|
|
1018 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1019 |
step=64)
|
1020 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1021 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=True)
|
1022 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1023 |
detect_resolution = gr.Slider(label="HED Resolution", minimum=128, maximum=1024, value=512,
|
1024 |
step=1)
|
@@ -1048,7 +1048,7 @@ with demo:
|
|
1048 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1049 |
step=64)
|
1050 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1051 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=False)
|
1052 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1053 |
detect_resolution = gr.Slider(label="HED Resolution", minimum=128, maximum=1024, value=512,
|
1054 |
step=1)
|
@@ -1078,7 +1078,7 @@ with demo:
|
|
1078 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1079 |
step=64)
|
1080 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1081 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=True)
|
1082 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1083 |
detect_resolution = gr.Slider(label="Depth Resolution", minimum=128, maximum=1024, value=384,
|
1084 |
step=1)
|
@@ -1108,7 +1108,7 @@ with demo:
|
|
1108 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1109 |
step=64)
|
1110 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1111 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=True)
|
1112 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1113 |
detect_resolution = gr.Slider(label="Depth Resolution", minimum=128, maximum=1024, value=384,
|
1114 |
step=1)
|
@@ -1138,7 +1138,7 @@ with demo:
|
|
1138 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1139 |
step=64)
|
1140 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1141 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=True)
|
1142 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1143 |
detect_resolution = gr.Slider(label="OpenPose Resolution", minimum=128, maximum=1024, value=512,
|
1144 |
step=1)
|
@@ -1168,7 +1168,7 @@ with demo:
|
|
1168 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1169 |
step=64)
|
1170 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1171 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=True)
|
1172 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1173 |
detect_resolution = gr.Slider(label="Segmentation Resolution", minimum=128, maximum=1024,
|
1174 |
value=512, step=1)
|
@@ -1198,7 +1198,7 @@ with demo:
|
|
1198 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1199 |
step=64)
|
1200 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1201 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=True)
|
1202 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1203 |
confidence = gr.Slider(label="Confidence of Detection", minimum=0.1, maximum=1.0, value=0.4,
|
1204 |
step=0.1)
|
@@ -1229,10 +1229,19 @@ with demo:
|
|
1229 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1230 |
step=64)
|
1231 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1232 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=False)
|
1233 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1234 |
-
|
1235 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1236 |
ddim_steps = gr.Slider(label="Steps", minimum=1, maximum=100, value=20, step=1)
|
1237 |
scale = gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, value=9.0, step=0.1)
|
1238 |
seed = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, randomize=True)
|
@@ -1243,7 +1252,7 @@ with demo:
|
|
1243 |
result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery").style(grid=2,
|
1244 |
height='auto')
|
1245 |
ips = [input_image, prompt, a_prompt, n_prompt, num_samples, image_resolution, ddim_steps, guess_mode,
|
1246 |
-
strength, scale, seed, eta,
|
1247 |
run_button.click(fn=process_outpainting, inputs=ips, outputs=[result_gallery])
|
1248 |
|
1249 |
with gr.TabItem("Inpainting"):
|
@@ -1259,15 +1268,15 @@ with demo:
|
|
1259 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1260 |
step=64)
|
1261 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1262 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=False)
|
1263 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1264 |
-
h_ratio_t = gr.Slider(label="
|
1265 |
step=1)
|
1266 |
-
h_ratio_d = gr.Slider(label="
|
1267 |
step=1)
|
1268 |
-
w_ratio_l = gr.Slider(label="
|
1269 |
step=1)
|
1270 |
-
w_ratio_r = gr.Slider(label="
|
1271 |
step=1)
|
1272 |
ddim_steps = gr.Slider(label="Steps", minimum=1, maximum=100, value=20, step=1)
|
1273 |
scale = gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, value=9.0, step=0.1)
|
@@ -1295,7 +1304,7 @@ with demo:
|
|
1295 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1296 |
step=64)
|
1297 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1298 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=False)
|
1299 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1300 |
ddim_steps = gr.Slider(label="Steps", minimum=1, maximum=100, value=20, step=1)
|
1301 |
scale = gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, value=9.0, step=0.1)
|
@@ -1323,7 +1332,7 @@ with demo:
|
|
1323 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1324 |
step=64)
|
1325 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1326 |
-
condition_mode = gr.Checkbox(label='Condition Extraction', value=False)
|
1327 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1328 |
ksize = gr.Slider(label="Kernel Size", minimum=11, maximum=101, value=51, step=2)
|
1329 |
ddim_steps = gr.Slider(label="Steps", minimum=1, maximum=100, value=20, step=1)
|
|
|
54 |
return results
|
55 |
|
56 |
|
57 |
+
def outpainting(img, res, height_top_extended, height_down_extended, width_left_extended, width_right_extended):
|
58 |
img = resize_image(HWC3(img), res)
|
59 |
+
result = model_outpainting(img, height_top_extended, height_down_extended, width_left_extended, width_right_extended)
|
60 |
return result
|
61 |
|
62 |
|
|
|
72 |
return result
|
73 |
|
74 |
|
75 |
+
def inpainting(img, res, height_top_mask, height_down_mask, width_left_mask, width_right_mask):
|
76 |
img = resize_image(HWC3(img), res)
|
77 |
+
result = model_inpainting(img, height_top_mask, height_down_mask, width_left_mask, width_right_mask)
|
78 |
return result
|
79 |
|
80 |
model = create_model('./models/cldm_v15_unicontrol.yaml').cpu()
|
|
|
631 |
|
632 |
|
633 |
def process_outpainting(input_image, prompt, a_prompt, n_prompt, num_samples, image_resolution, ddim_steps, guess_mode,
|
634 |
+
strength, scale, seed, eta, height_top_extended, height_down_extended, width_left_extended, width_right_extended, condition_mode):
|
635 |
with torch.no_grad():
|
636 |
input_image = HWC3(input_image)
|
637 |
img = resize_image(input_image, image_resolution)
|
638 |
H, W, C = img.shape
|
639 |
if condition_mode == True:
|
640 |
+
detected_map = outpainting(input_image, image_resolution, height_top_extended, height_down_extended, width_left_extended, width_right_extended)
|
641 |
else:
|
642 |
detected_map = img
|
643 |
|
|
|
987 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
988 |
step=64)
|
989 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
990 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Canny', value=True)
|
991 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
992 |
low_threshold = gr.Slider(label="Canny low threshold", minimum=1, maximum=255, value=40, step=1)
|
993 |
high_threshold = gr.Slider(label="Canny high threshold", minimum=1, maximum=255, value=200,
|
|
|
1018 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1019 |
step=64)
|
1020 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1021 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> HED', value=True)
|
1022 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1023 |
detect_resolution = gr.Slider(label="HED Resolution", minimum=128, maximum=1024, value=512,
|
1024 |
step=1)
|
|
|
1048 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1049 |
step=64)
|
1050 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1051 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Sketch', value=False)
|
1052 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1053 |
detect_resolution = gr.Slider(label="HED Resolution", minimum=128, maximum=1024, value=512,
|
1054 |
step=1)
|
|
|
1078 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1079 |
step=64)
|
1080 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1081 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Depth', value=True)
|
1082 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1083 |
detect_resolution = gr.Slider(label="Depth Resolution", minimum=128, maximum=1024, value=384,
|
1084 |
step=1)
|
|
|
1108 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1109 |
step=64)
|
1110 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1111 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Normal', value=True)
|
1112 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1113 |
detect_resolution = gr.Slider(label="Depth Resolution", minimum=128, maximum=1024, value=384,
|
1114 |
step=1)
|
|
|
1138 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1139 |
step=64)
|
1140 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1141 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Skeleton', value=True)
|
1142 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1143 |
detect_resolution = gr.Slider(label="OpenPose Resolution", minimum=128, maximum=1024, value=512,
|
1144 |
step=1)
|
|
|
1168 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1169 |
step=64)
|
1170 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1171 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Seg', value=True)
|
1172 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1173 |
detect_resolution = gr.Slider(label="Segmentation Resolution", minimum=128, maximum=1024,
|
1174 |
value=512, step=1)
|
|
|
1198 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1199 |
step=64)
|
1200 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1201 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Bbox', value=True)
|
1202 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1203 |
confidence = gr.Slider(label="Confidence of Detection", minimum=0.1, maximum=1.0, value=0.4,
|
1204 |
step=0.1)
|
|
|
1229 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1230 |
step=64)
|
1231 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1232 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: Extending', value=False)
|
1233 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1234 |
+
|
1235 |
+
height_top_extended = gr.Slider(label="Top Extended Ratio (%)", minimum=1, maximum=200,
|
1236 |
+
value=50, step=1)
|
1237 |
+
height_down_extended = gr.Slider(label="Down Extended Ratio (%)", minimum=1, maximum=200,
|
1238 |
+
value=50, step=1)
|
1239 |
+
|
1240 |
+
width_left_extended = gr.Slider(label="Left Extended Ratio (%)", minimum=1, maximum=200,
|
1241 |
+
value=50, step=1)
|
1242 |
+
width_right_extended = gr.Slider(label="Right Extended Ratio (%)", minimum=1, maximum=200,
|
1243 |
+
value=50, step=1)
|
1244 |
+
|
1245 |
ddim_steps = gr.Slider(label="Steps", minimum=1, maximum=100, value=20, step=1)
|
1246 |
scale = gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, value=9.0, step=0.1)
|
1247 |
seed = gr.Slider(label="Seed", minimum=-1, maximum=2147483647, step=1, randomize=True)
|
|
|
1252 |
result_gallery = gr.Gallery(label='Output', show_label=False, elem_id="gallery").style(grid=2,
|
1253 |
height='auto')
|
1254 |
ips = [input_image, prompt, a_prompt, n_prompt, num_samples, image_resolution, ddim_steps, guess_mode,
|
1255 |
+
strength, scale, seed, eta, height_top_extended, height_down_extended, width_left_extended, width_right_extended, condition_mode]
|
1256 |
run_button.click(fn=process_outpainting, inputs=ips, outputs=[result_gallery])
|
1257 |
|
1258 |
with gr.TabItem("Inpainting"):
|
|
|
1268 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1269 |
step=64)
|
1270 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1271 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: Cropped Masking', value=False)
|
1272 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1273 |
+
h_ratio_t = gr.Slider(label="Top Masking Ratio (%)", minimum=0, maximum=100, value=30,
|
1274 |
step=1)
|
1275 |
+
h_ratio_d = gr.Slider(label="Down Masking Ratio (%)", minimum=0, maximum=100, value=60,
|
1276 |
step=1)
|
1277 |
+
w_ratio_l = gr.Slider(label="Left Masking Ratio (%)", minimum=0, maximum=100, value=30,
|
1278 |
step=1)
|
1279 |
+
w_ratio_r = gr.Slider(label="Right Masking Ratio (%)", minimum=0, maximum=100, value=60,
|
1280 |
step=1)
|
1281 |
ddim_steps = gr.Slider(label="Steps", minimum=1, maximum=100, value=20, step=1)
|
1282 |
scale = gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, value=9.0, step=0.1)
|
|
|
1304 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1305 |
step=64)
|
1306 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1307 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Gray', value=False)
|
1308 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1309 |
ddim_steps = gr.Slider(label="Steps", minimum=1, maximum=100, value=20, step=1)
|
1310 |
scale = gr.Slider(label="Guidance Scale", minimum=0.1, maximum=30.0, value=9.0, step=0.1)
|
|
|
1332 |
image_resolution = gr.Slider(label="Image Resolution", minimum=256, maximum=768, value=512,
|
1333 |
step=64)
|
1334 |
strength = gr.Slider(label="Control Strength", minimum=0.0, maximum=2.0, value=1.0, step=0.01)
|
1335 |
+
condition_mode = gr.Checkbox(label='Condition Extraction: RGB -> Blur', value=False)
|
1336 |
guess_mode = gr.Checkbox(label='Guess Mode', value=False)
|
1337 |
ksize = gr.Slider(label="Kernel Size", minimum=11, maximum=101, value=51, step=2)
|
1338 |
ddim_steps = gr.Slider(label="Steps", minimum=1, maximum=100, value=20, step=1)
|
requirements.txt
CHANGED
@@ -22,4 +22,4 @@ xformers==0.0.16
|
|
22 |
yapf==0.32.0
|
23 |
cvlib==0.2.7
|
24 |
tensorflow-cpu
|
25 |
-
basicsr==1.4.2
|
|
|
22 |
yapf==0.32.0
|
23 |
cvlib==0.2.7
|
24 |
tensorflow-cpu
|
25 |
+
basicsr==1.4.2
|