Upload app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import cv2
|
|
4 |
from annotator.util import resize_image, HWC3
|
5 |
|
6 |
DESCRIPTION = '# ControlNet v1.1 Annotators (that runs on cpu only)'
|
7 |
-
DESCRIPTION += '\n<p>
|
8 |
|
9 |
|
10 |
model_canny = None
|
@@ -148,7 +148,7 @@ def lineart(img, res, coarse=False, invert=True):
|
|
148 |
from annotator.lineart import LineartDetector
|
149 |
model_lineart = LineartDetector()
|
150 |
# result = model_lineart(img, coarse)
|
151 |
-
if invert
|
152 |
result = cv2.bitwise_not(model_lineart(img, coarse))
|
153 |
else
|
154 |
result = model_lineart(img, coarse)
|
|
|
4 |
from annotator.util import resize_image, HWC3
|
5 |
|
6 |
DESCRIPTION = '# ControlNet v1.1 Annotators (that runs on cpu only)'
|
7 |
+
DESCRIPTION += '\n<p>HEIC image are not converted. Please use PNG or JPG images.</p>'
|
8 |
|
9 |
|
10 |
model_canny = None
|
|
|
148 |
from annotator.lineart import LineartDetector
|
149 |
model_lineart = LineartDetector()
|
150 |
# result = model_lineart(img, coarse)
|
151 |
+
if invert == True
|
152 |
result = cv2.bitwise_not(model_lineart(img, coarse))
|
153 |
else
|
154 |
result = model_lineart(img, coarse)
|