mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-11 07:37:03 -07:00
1
This commit is contained in:
parent
0c93b89e87
commit
60804ca3ba
3 changed files with 20 additions and 15 deletions
|
@ -76,7 +76,11 @@ class nn():
|
||||||
|
|
||||||
first_run = False
|
first_run = False
|
||||||
|
|
||||||
|
if not device_config.cpu_only:
|
||||||
if sys.platform[0:3] == 'win':
|
if sys.platform[0:3] == 'win':
|
||||||
|
if all( [ x.name == device_config.devices[0].name for x in device_config.devices ] ):
|
||||||
|
devices_str = "_" + device_config.devices[0].name.replace(' ','_')
|
||||||
|
else:
|
||||||
devices_str = ""
|
devices_str = ""
|
||||||
for device in device_config.devices:
|
for device in device_config.devices:
|
||||||
devices_str += "_" + device.name.replace(' ','_')
|
devices_str += "_" + device.name.replace(' ','_')
|
||||||
|
|
|
@ -156,6 +156,8 @@ class ExtractSubprocessor(Subprocessor):
|
||||||
landmarks_extractor,
|
landmarks_extractor,
|
||||||
rects_extractor,
|
rects_extractor,
|
||||||
):
|
):
|
||||||
|
h, w, ch = image.shape
|
||||||
|
|
||||||
if data.rects_rotation == 0:
|
if data.rects_rotation == 0:
|
||||||
rotated_image = image
|
rotated_image = image
|
||||||
elif data.rects_rotation == 90:
|
elif data.rects_rotation == 90:
|
||||||
|
|
|
@ -615,9 +615,9 @@ class SAEHDModel(ModelBase):
|
||||||
with tf.device( f'/GPU:0' if len(devices) != 0 else f'/CPU:0'):
|
with tf.device( f'/GPU:0' if len(devices) != 0 else f'/CPU:0'):
|
||||||
if 'df' in archi:
|
if 'df' in archi:
|
||||||
gpu_dst_code = self.inter(self.encoder(self.warped_dst))
|
gpu_dst_code = self.inter(self.encoder(self.warped_dst))
|
||||||
gpu_pred_src_dst = self.decoder_src(gpu_dst_code)
|
gpu_pred_src_dst, gpu_pred_src_dstm = self.decoder_src(gpu_dst_code)
|
||||||
gpu_pred_dst_dstm = self.decoder_dstm(gpu_dst_code)
|
_, gpu_pred_dst_dstm = self.decoder_dst(gpu_dst_code)
|
||||||
gpu_pred_src_dstm = self.decoder_srcm(gpu_dst_code)
|
|
||||||
elif 'liae' in archi:
|
elif 'liae' in archi:
|
||||||
gpu_dst_code = self.encoder (self.warped_dst)
|
gpu_dst_code = self.encoder (self.warped_dst)
|
||||||
gpu_dst_inter_B_code = self.inter_B (gpu_dst_code)
|
gpu_dst_inter_B_code = self.inter_B (gpu_dst_code)
|
||||||
|
@ -625,9 +625,8 @@ class SAEHDModel(ModelBase):
|
||||||
gpu_dst_code = tf.concat([gpu_dst_inter_B_code,gpu_dst_inter_AB_code],-1)
|
gpu_dst_code = tf.concat([gpu_dst_inter_B_code,gpu_dst_inter_AB_code],-1)
|
||||||
gpu_src_dst_code = tf.concat([gpu_dst_inter_AB_code,gpu_dst_inter_AB_code],-1)
|
gpu_src_dst_code = tf.concat([gpu_dst_inter_AB_code,gpu_dst_inter_AB_code],-1)
|
||||||
|
|
||||||
gpu_pred_src_dst = self.decoder(gpu_src_dst_code)
|
gpu_pred_src_dst, gpu_pred_src_dstm = self.decoder(gpu_src_dst_code)
|
||||||
gpu_pred_dst_dstm = self.decoderm(gpu_dst_code)
|
_, gpu_pred_dst_dstm = self.decoder(gpu_dst_code)
|
||||||
gpu_pred_src_dstm = self.decoderm(gpu_src_dst_code)
|
|
||||||
|
|
||||||
if learn_mask:
|
if learn_mask:
|
||||||
def AE_merge( warped_dst):
|
def AE_merge( warped_dst):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue