gavinyuan commited on
Commit
396310b
1 Parent(s): b4cdcef

update: app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -317,7 +317,7 @@ def process_video(
317
  output = G(source_img, target)
318
  target_hair_mask = trick.get_any_mask(target, par=[0, 17])
319
  target_hair_mask = trick.smooth_mask(target_hair_mask)
320
- output = target_hair_mask * target + (target_hair_mask * (-1) + 1) * output
321
  output = trick.finetune_mouth(source_img, target, output)
322
  elif 'simswap' in fs_model_name and 'official' not in fs_model_name:
323
  output = fs_model(source=source_img, target=target,
@@ -325,7 +325,7 @@ def process_video(
325
  if 'vanilla' not in fs_model_name:
326
  target_hair_mask = trick.get_any_mask(target, par=[0, 17])
327
  target_hair_mask = trick.smooth_mask(target_hair_mask)
328
- output = target_hair_mask * target + (target_hair_mask * (-1) + 1) * output
329
  output = trick.finetune_mouth(source_img, target, output)
330
  output = output.clamp(-1, 1)
331
  elif 'simswap_official' in fs_model_name:
 
317
  output = G(source_img, target)
318
  target_hair_mask = trick.get_any_mask(target, par=[0, 17])
319
  target_hair_mask = trick.smooth_mask(target_hair_mask)
320
+ output = target_hair_mask * target + (target_hair_mask * (-1.) + 1.) * output
321
  output = trick.finetune_mouth(source_img, target, output)
322
  elif 'simswap' in fs_model_name and 'official' not in fs_model_name:
323
  output = fs_model(source=source_img, target=target,
 
325
  if 'vanilla' not in fs_model_name:
326
  target_hair_mask = trick.get_any_mask(target, par=[0, 17])
327
  target_hair_mask = trick.smooth_mask(target_hair_mask)
328
+ output = target_hair_mask * target + (target_hair_mask * (-1.) + 1.) * output
329
  output = trick.finetune_mouth(source_img, target, output)
330
  output = output.clamp(-1, 1)
331
  elif 'simswap_official' in fs_model_name: