Spaces:
Runtime error
Runtime error
zhiweili
commited on
Commit
·
14417c8
1
Parent(s):
ad2fa8d
change adapter
Browse files
app_haircolor_inpaint_adapter_15.py
CHANGED
|
@@ -91,13 +91,13 @@ def image_to_image(
|
|
| 91 |
):
|
| 92 |
run_task_time = 0
|
| 93 |
time_cost_str = ''
|
| 94 |
-
detect_image = input_image.convert('L')
|
| 95 |
run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
|
| 96 |
# canny_image = canny_detector(input_image, int(generate_size*1), generate_size)
|
| 97 |
# canny_image = custom_canny_detector(input_image)
|
| 98 |
# lineart_image = lineart_detector(input_image, int(generate_size*1), generate_size)
|
| 99 |
# run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
|
| 100 |
-
pidiNet_image = pidiNet_detector(
|
|
|
|
| 101 |
# cond_image = [canny_image, pidiNet_image]
|
| 102 |
# cond_scale = [cond_scale1, cond_scale2]
|
| 103 |
|
|
|
|
| 91 |
):
|
| 92 |
run_task_time = 0
|
| 93 |
time_cost_str = ''
|
|
|
|
| 94 |
run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
|
| 95 |
# canny_image = canny_detector(input_image, int(generate_size*1), generate_size)
|
| 96 |
# canny_image = custom_canny_detector(input_image)
|
| 97 |
# lineart_image = lineart_detector(input_image, int(generate_size*1), generate_size)
|
| 98 |
# run_task_time, time_cost_str = get_time_cost(run_task_time, time_cost_str)
|
| 99 |
+
pidiNet_image = pidiNet_detector(input_image, int(generate_size*1), generate_size)
|
| 100 |
+
pidiNet_image = pidiNet_image.convert("L")
|
| 101 |
# cond_image = [canny_image, pidiNet_image]
|
| 102 |
# cond_scale = [cond_scale1, cond_scale2]
|
| 103 |
|