mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-07 05:22:06 -07:00
old SAE model will not work with this update.
Fixed bug when SAE can be collapsed during a time. SAE: removed CA weights and encoder/decoder dims. added new options: Encoder dims per channel (21-85 ?:help skip:%d) More encoder dims help to recognize more facial features, but require more VRAM. You can fine-tune model size to fit your GPU. Decoder dims per channel (11-85 ?:help skip:%d) More decoder dims help to get better details, but require more VRAM. You can fine-tune model size to fit your GPU. Add residual blocks to decoder? (y/n, ?:help skip:n) : These blocks help to get better details, but require more computing time. Remove gray border? (y/n, ?:help skip:n) : Removes gray border of predicted face, but requires more computing resources.
This commit is contained in:
parent
4f4447d719
commit
37505d88e3
12 changed files with 264 additions and 47242 deletions
|
@ -608,6 +608,20 @@ NLayerDiscriminator = nnlib.NLayerDiscriminator
|
|||
return K.tf.pad(x, [[0,0], [h_pad,h_pad], [w_pad,w_pad], [0,0] ], 'REFLECT')
|
||||
elif backend == "plaidML":
|
||||
return TileOP_ReflectionPadding2D.function(x, self.padding[0], self.padding[1])
|
||||
else:
|
||||
if K.image_data_format() == 'channels_last':
|
||||
if x.shape.ndims == 4:
|
||||
w = K.concatenate ([ x[:,:,w_pad:0:-1,:],
|
||||
x,
|
||||
x[:,:,-2:-w_pad-2:-1,:] ], axis=2 )
|
||||
h = K.concatenate ([ w[:,h_pad:0:-1,:,:],
|
||||
w,
|
||||
w[:,-2:-h_pad-2:-1,:,:] ], axis=1 )
|
||||
return h
|
||||
else:
|
||||
raise NotImplemented
|
||||
else:
|
||||
raise NotImplemented
|
||||
|
||||
nnlib.ReflectionPadding2D = ReflectionPadding2D
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue