atatakun commited on
Commit
b5169a3
1 Parent(s): 05ff922

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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>If the source image is a HEIC, it cannot be converted. Please use PNG or JPG as source image.</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 is True
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)