-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathhubconf.py
70 lines (58 loc) · 2.47 KB
/
hubconf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
dependencies = ['torch']
import torch
import pioneer.session
def ffhq512(pretrained, **kwargs):
""" The Automodulator FFHQ 512x512 pre-trained model
"""
if pretrained:
checkpoint_index = 42420000
save_dir = 'https://zenodo.org/record/4298894/files/42420000_state.pth?download=1'
else:
checkpoint_index = 0
save_dir = 'ffhq512'
return pioneer.session.Session( pretrained=pretrained, save_dir=save_dir, \
transform_key='ffhq512', start_iteration=checkpoint_index, **kwargs)
def celebahq256(pretrained, **kwargs):
""" The Automodulator CelebA-HQ 256x256 pre-trained model
"""
if pretrained:
checkpoint_index = 31877148
save_dir = 'https://zenodo.org/record/4298894/files/31877148_state.pth?download=1'
else:
checkpoint_index = 0
save_dir = 'celebaHQ256'
return pioneer.session.Session( pretrained=pretrained, save_dir=save_dir, \
start_iteration=checkpoint_index, arch='small', **kwargs)
def ffhq256(pretrained, **kwargs):
""" The Automodulator FFHQ 256x256 pre-trained model
"""
if pretrained:
checkpoint_index = 34740000
save_dir = 'https://zenodo.org/record/4298894/files/34740000_state.pth?download=1'
else:
checkpoint_index = 0
save_dir = 'ffhq256'
return pioneer.session.Session( pretrained=pretrained, save_dir=save_dir, \
start_iteration=checkpoint_index, **kwargs)
def lsuncars256(pretrained, **kwargs):
""" The Automodulator LSUN Cars 256x256 pre-trained model
"""
if pretrained:
checkpoint_index = 32057140
save_dir = 'https://zenodo.org/record/4298894/files/32057140_state.pth?download=1'
else:
checkpoint_index = 0
save_dir='lsunCars256'
return pioneer.session.Session( pretrained=pretrained, save_dir=save_dir, \
start_iteration=checkpoint_index, **kwargs)
def lsunbedrooms256(pretrained, **kwargs):
""" The Automodulator LSUN Bedrooms 256x256 pre-trained model
"""
if pretrained:
checkpoint_index = 27574284
save_dir = 'https://zenodo.org/record/4298894/files/27574284_state.pth?download=1'
else:
checkpoint_index = 0
save_dir='lsunBedrooms256'
return pioneer.session.Session( pretrained=pretrained, save_dir=save_dir, \
start_iteration=checkpoint_index, **kwargs)