Spaces:
Running
on
T4
Running
on
T4
Ahsen Khaliq
commited on
Commit
•
2fb1494
1
Parent(s):
48b9ade
Update app.py
Browse files
app.py
CHANGED
@@ -135,13 +135,13 @@ modelv2 = torch.jit.load('./ArcaneGANv0.2.jit').eval().cuda().half()
|
|
135 |
|
136 |
def process(im, version):
|
137 |
if version == 'version 0.4':
|
138 |
-
im = scale_by_face_size(im, target_face=
|
139 |
res = proc_pil_img(im, modelv4)
|
140 |
elif version == 'version 0.3':
|
141 |
-
im = scale_by_face_size(im, target_face=
|
142 |
res = proc_pil_img(im, modelv3)
|
143 |
else:
|
144 |
-
im = scale_by_face_size(im, target_face=
|
145 |
res = proc_pil_img(im, modelv2)
|
146 |
return res
|
147 |
|
|
|
135 |
|
136 |
def process(im, version):
|
137 |
if version == 'version 0.4':
|
138 |
+
im = scale_by_face_size(im, target_face=256, max_res=1_500_000, max_upscale=1)
|
139 |
res = proc_pil_img(im, modelv4)
|
140 |
elif version == 'version 0.3':
|
141 |
+
im = scale_by_face_size(im, target_face=256, max_res=1_500_000, max_upscale=1)
|
142 |
res = proc_pil_img(im, modelv3)
|
143 |
else:
|
144 |
+
im = scale_by_face_size(im, target_face=256, max_res=1_500_000, max_upscale=1)
|
145 |
res = proc_pil_img(im, modelv2)
|
146 |
return res
|
147 |
|