Skip to content

Commit

Permalink
Merge pull request bryandlee#26 from AK391/main
Browse files Browse the repository at this point in the history
add side by side option to torch hub model
  • Loading branch information
bryandlee committed Nov 16, 2021
2 parents 6c2de96 + 50b4c15 commit dd91006
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hubconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ def generator(pretrained=True, device="cpu", progress=True, check_hash=True):
return model


def face2paint(device="cpu", size=512):
def face2paint(device="cpu", size=512, side_by_side=False):
from PIL import Image
from torchvision.transforms.functional import to_tensor, to_pil_image

def face2paint(
model: torch.nn.Module,
img: Image.Image,
size: int = size,
side_by_side: bool = True,
side_by_side: bool = side_by_side,
device: str = device,
) -> Image.Image:
w, h = img.size
Expand Down

0 comments on commit dd91006

Please sign in to comment.