Skip to content

Commit c91e500

Browse files
committed
fix generating images with ModelLoader
1 parent 95e6d48 commit c91e500

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

stylegan2_pytorch/stylegan2_pytorch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ def __init__(
700700
mixed_prob = 0.9,
701701
gradient_accumulate_every=1,
702702
lr = 2e-4,
703-
lr_mlp = 1.,
703+
lr_mlp = 0.1,
704704
ttur_mult = 2,
705705
rel_disc_loss = False,
706706
num_workers = None,
@@ -848,11 +848,12 @@ def load_config(self):
848848
self.fmap_max = config.pop('fmap_max', 512)
849849
self.attn_layers = config.pop('attn_layers', [])
850850
self.no_const = config.pop('no_const', False)
851+
self.lr_mlp = config.pop('lr_mlp', 0.1)
851852
del self.GAN
852853
self.init_GAN()
853854

854855
def config(self):
855-
return {'image_size': self.image_size, 'network_capacity': self.network_capacity, 'transparent': self.transparent, 'fq_layers': self.fq_layers, 'fq_dict_size': self.fq_dict_size, 'attn_layers': self.attn_layers, 'no_const': self.no_const}
856+
return {'image_size': self.image_size, 'network_capacity': self.network_capacity, 'lr_mlp': self.lr_mlp, 'transparent': self.transparent, 'fq_layers': self.fq_layers, 'fq_dict_size': self.fq_dict_size, 'attn_layers': self.attn_layers, 'no_const': self.no_const}
856857

857858
def set_data_src(self, folder):
858859
self.dataset = Dataset(folder, self.image_size, transparent = self.transparent, aug_prob = self.dataset_aug_prob)

stylegan2_pytorch/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.5.8'
1+
__version__ = '1.5.9'

0 commit comments

Comments
 (0)