Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
animegan2-pytorch
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
git
animegan2-pytorch
Commits
dd910061
Unverified
Commit
dd910061
authored
Nov 16, 2021
by
bryandlee
Committed by
GitHub
Nov 16, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26 from AK391/main
add side by side option to torch hub model
parents
6c2de966
50b4c151
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
hubconf.py
hubconf.py
+2
-2
No files found.
hubconf.py
View file @
dd910061
...
...
@@ -33,7 +33,7 @@ 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
...
...
@@ -41,7 +41,7 @@ def face2paint(device="cpu", size=512):
model
:
torch
.
nn
.
Module
,
img
:
Image
.
Image
,
size
:
int
=
size
,
side_by_side
:
bool
=
Tru
e
,
side_by_side
:
bool
=
side_by_sid
e
,
device
:
str
=
device
,
)
->
Image
.
Image
:
w
,
h
=
img
.
size
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment