Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,11 +16,11 @@ model2 = torch.hub.load(
|
|
16 |
model1 = torch.hub.load("AK391/animegan2-pytorch:main", "generator", pretrained="celeba_distill", device="cpu")
|
17 |
face2paint = torch.hub.load(
|
18 |
'AK391/animegan2-pytorch:main', 'face2paint',
|
19 |
-
size=
|
20 |
)
|
21 |
def inference(img, ver):
|
22 |
|
23 |
-
|
24 |
return out
|
25 |
|
26 |
title = "AnimeGANv2"
|
|
|
16 |
model1 = torch.hub.load("AK391/animegan2-pytorch:main", "generator", pretrained="celeba_distill", device="cpu")
|
17 |
face2paint = torch.hub.load(
|
18 |
'AK391/animegan2-pytorch:main', 'face2paint',
|
19 |
+
size=img.shape[1], device="cpu",side_by_side=False
|
20 |
)
|
21 |
def inference(img, ver):
|
22 |
|
23 |
+
out = face2paint(model1, img)
|
24 |
return out
|
25 |
|
26 |
title = "AnimeGANv2"
|