|
@ -27,8 +27,9 @@ class Animegan(Operator): |
|
|
self.tfms = transforms.Compose([ |
|
|
self.tfms = transforms.Compose([ |
|
|
transforms.ToTensor() |
|
|
transforms.ToTensor() |
|
|
]) |
|
|
]) |
|
|
@arg(1, to_image_color('RGB') ) |
|
|
|
|
|
|
|
|
@arg(1, to_image_color('RGB')) |
|
|
def __call__(self, image): |
|
|
def __call__(self, image): |
|
|
img = self.tfms(image).unsqueeze(0) |
|
|
img = self.tfms(image).unsqueeze(0) |
|
|
|
|
|
print(img.shape) |
|
|
styled_image = self.model(img) |
|
|
styled_image = self.model(img) |
|
|
return Image(styled_image, 'RGB') |
|
|
return Image(styled_image, 'RGB') |
|
|