Spaces:
Running
on
A10G
Running
on
A10G
Xintao
commited on
Commit
•
8008449
1
Parent(s):
f6a7541
update scale limit
Browse files
app.py
CHANGED
@@ -48,8 +48,8 @@ os.makedirs('output', exist_ok=True)
|
|
48 |
def inference(img, version, scale):
|
49 |
# weight /= 100
|
50 |
print(img, version, scale)
|
51 |
-
if scale >
|
52 |
-
scale =
|
53 |
try:
|
54 |
extension = os.path.splitext(os.path.basename(str(img)))[1]
|
55 |
img = cv2.imread(img, cv2.IMREAD_UNCHANGED)
|
|
|
48 |
def inference(img, version, scale):
|
49 |
# weight /= 100
|
50 |
print(img, version, scale)
|
51 |
+
if scale > 4:
|
52 |
+
scale = 4 # avoid too large scale value
|
53 |
try:
|
54 |
extension = os.path.splitext(os.path.basename(str(img)))[1]
|
55 |
img = cv2.imread(img, cv2.IMREAD_UNCHANGED)
|